[SCM] PostGIS branch master updated. 3.6.0rc2-666-gc444ca85e

git at osgeo.org git at osgeo.org
Wed Jun 24 11:10:16 PDT 2026


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  c444ca85e9b97bbd020d45ce12b0ac04b7602c4d (commit)
      from  322177e5376d9e38e0694b72403770755c80adb6 (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 c444ca85e9b97bbd020d45ce12b0ac04b7602c4d
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jun 24 18:09:48 2026 +0000

    Ape OGC convention and return NULL for unsupported input types

diff --git a/postgis/lwgeom_ogc.c b/postgis/lwgeom_ogc.c
index 5c87ea616..0270116d2 100644
--- a/postgis/lwgeom_ogc.c
+++ b/postgis/lwgeom_ogc.c
@@ -359,7 +359,7 @@ Datum LWGEOM_numpatches(PG_FUNCTION_ARGS)
 	{
 		lwgeom_free(lwgeom);
 		PG_FREE_IF_COPY(geom, 0);
-		elog(ERROR, "ST_NumPatches only supports TIN and PolyhedralSurface geometries");
+		PG_RETURN_NULL();
 	}
 
 	ret = lwgeom_count_geometries(lwgeom, true);
@@ -466,14 +466,18 @@ Datum LWGEOM_patchn(PG_FUNCTION_ARGS)
 	{
 		lwgeom_free(lwgeom);
 		PG_FREE_IF_COPY(geom, 0);
-		elog(ERROR, "ST_PatchN only supports TIN and PolyhedralSurface geometries");
+		PG_RETURN_NULL();
 	}
 
 	/* Access patches individually */
 	subgeom = lwgeom_extract_geometry_n(lwgeom, idx, true);
 
 	if (!subgeom)
+	{
+		lwgeom_free(lwgeom);
+		PG_FREE_IF_COPY(geom, 0);
 		PG_RETURN_NULL();
+	}
 
 	/* If returning the original geometry */
 	if (subgeom == lwgeom)

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

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


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list