[SCM] PostGIS branch master updated. 3.6.0rc2-49-g93113f807
git at osgeo.org
git at osgeo.org
Wed Sep 17 11:57:11 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 93113f80702b23e024bb4a729103c46e02d41a84 (commit)
from 5714578cf65f27f1716e7fcd292b6714119bd5b7 (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 93113f80702b23e024bb4a729103c46e02d41a84
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Sep 17 11:57:06 2025 -0700
ST_GeometryN fails for non-collections, closes #5987
diff --git a/postgis/lwgeom_ogc.c b/postgis/lwgeom_ogc.c
index d38fb1390..d58903892 100644
--- a/postgis/lwgeom_ogc.c
+++ b/postgis/lwgeom_ogc.c
@@ -384,20 +384,14 @@ Datum LWGEOM_geometryn_collection(PG_FUNCTION_ARGS)
if (!subgeom)
PG_RETURN_NULL();
- /* If returning the original geometry */
- if (subgeom == lwgeom)
+ /* If not returning the original geometry */
+ if (subgeom != lwgeom)
{
- lwgeom_free(lwgeom);
- PG_FREE_IF_COPY(geom, 0);
- PG_RETURN_POINTER(geom);
+ subgeom->srid = lwgeom->srid;
+ /* COMPUTE_BBOX==TAINTING */
+ if (lwgeom->bbox) lwgeom_add_bbox(subgeom);
}
-
- subgeom->srid = lwgeom->srid;
- /* COMPUTE_BBOX==TAINTING */
- if (lwgeom->bbox) lwgeom_add_bbox(subgeom);
-
result = geometry_serialize(subgeom);
- lwgeom_free(lwgeom);
PG_FREE_IF_COPY(geom, 0);
PG_RETURN_POINTER(result);
}
-----------------------------------------------------------------------
Summary of changes:
postgis/lwgeom_ogc.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list