[SCM] PostGIS branch master updated. 3.5.0-230-gb159ebbe9

git at osgeo.org git at osgeo.org
Thu Mar 20 14:36:23 PDT 2025


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  b159ebbe934c190fc874581fb5dbda6f9bd7453b (commit)
      from  50a5f3c40bad4eb65fb6b0d59c9d21b48fb94530 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b159ebbe934c190fc874581fb5dbda6f9bd7453b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Mar 20 14:35:55 2025 -0700

    Allow estimated_extent to work with table/namespace names closer to max length.
    References #5819

diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c
index e888dcb83..0f7d4f81a 100644
--- a/postgis/gserialized_estimate.c
+++ b/postgis/gserialized_estimate.c
@@ -2600,7 +2600,7 @@ Datum gserialized_estimated_extent(PG_FUNCTION_ARGS)
 	char *col = NULL;
 	int16 attnum, idx_attnum;
 	Oid atttypid = InvalidOid;
-	char nsp_tbl[NAMEDATALEN];
+	char nsp_tbl[2*NAMEDATALEN+6];
 	char *tbl;
 	Oid tbl_oid, idx_oid = 0;
 	ND_STATS *nd_stats;
@@ -2625,13 +2625,13 @@ Datum gserialized_estimated_extent(PG_FUNCTION_ARGS)
 		char *nsp = text_to_cstring(PG_GETARG_TEXT_P(0));
 		tbl = text_to_cstring(PG_GETARG_TEXT_P(1));
 		coltxt = PG_GETARG_TEXT_P(2);
-		snprintf(nsp_tbl, NAMEDATALEN, "\"%s\".\"%s\"", nsp, tbl);
+		snprintf(nsp_tbl, sizeof(nsp_tbl), "\"%s\".\"%s\"", nsp, tbl);
 	}
 	if ( PG_NARGS() == 2 )
 	{
 		tbl = text_to_cstring(PG_GETARG_TEXT_P(0));
 		coltxt = PG_GETARG_TEXT_P(1);
-		snprintf(nsp_tbl, NAMEDATALEN, "\"%s\"", tbl);
+		snprintf(nsp_tbl, sizeof(nsp_tbl), "\"%s\"", tbl);
 	}
 
 	/* Parse the namespace/table strings and lookup in system catalogs */

-----------------------------------------------------------------------

Summary of changes:
 postgis/gserialized_estimate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list