[SCM] PostGIS branch stable-3.5 updated. 3.5.4-11-g9edefcf51

git at osgeo.org git at osgeo.org
Mon Dec 22 05:06:13 PST 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, stable-3.5 has been updated
       via  9edefcf512798655375eb7ae6a0820546f1d45c9 (commit)
      from  6439eaff7e42a33ca67d37ca594e8898ac78640c (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 9edefcf512798655375eb7ae6a0820546f1d45c9
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Dec 22 13:42:26 2025 +0100

    Fix RemoveUnusedPrimitives without "topology" in search_path
    
    Includes regression test.
    
    References #6027 in stable-3.5 branch (3.5.5dev)

diff --git a/NEWS b/NEWS
index ad05e6f57..8aef123f7 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ PostgreSQL 12-18 required. GEOS 3.8+ required. Proj 6.1+ required.
 
   - #5959, #5984, Prevent histogram target overflow when analysing massive tables (Darafei Praliaskouski)
   - #6020, schema qualify call in ST_MPointFromText (Paul Ramsey)
+  - #6027, Fix RemoveUnusedPrimitives without topology in search_path (Sandro Santilli)
   - #6028, crash indexing malformed empty polygon (Paul Ramsey)
 
 
diff --git a/topology/sql/cleanup/RemoveUnusedPrimitives.sql.in b/topology/sql/cleanup/RemoveUnusedPrimitives.sql.in
index 423a7ed94..c3b7c054a 100644
--- a/topology/sql/cleanup/RemoveUnusedPrimitives.sql.in
+++ b/topology/sql/cleanup/RemoveUnusedPrimitives.sql.in
@@ -39,7 +39,7 @@ DECLARE
   moreMergedFaces INT[];
 BEGIN
 
-  topo := findTopology(atopology);
+  topo := topology.findTopology(atopology);
   IF topo.id IS NULL THEN
     RAISE EXCEPTION 'Could not find topology "%"', atopology;
   END IF;
diff --git a/topology/test/regress/removeunusedprimitives.sql b/topology/test/regress/removeunusedprimitives.sql
index 1581c27f2..e6aa4e452 100644
--- a/topology/test/regress/removeunusedprimitives.sql
+++ b/topology/test/regress/removeunusedprimitives.sql
@@ -1,4 +1,5 @@
 set client_min_messages to WARNING;
+set search_path to public,pg_catalog;
 
 \i :top_builddir/topology/test/load_topology.sql
 \i ../load_features.sql
@@ -74,7 +75,7 @@ WITH deleted AS (
   DELETE FROM features.city_streets WHERE feature_name IN ( 'R1' )
   RETURNING feature
 ), clear AS (
-  SELECT clearTopoGeom(feature) FROM deleted
+  SELECT topology.clearTopoGeom(feature) FROM deleted
 ) SELECT NULL FROM clear;
 
 --set client_min_messages to DEBUG;
@@ -88,7 +89,7 @@ WITH deleted AS (
   DELETE FROM features.traffic_signs WHERE feature_name IN ( 'S3' )
   RETURNING feature
 ), clear AS (
-  SELECT clearTopoGeom(feature) FROM deleted
+  SELECT topology.clearTopoGeom(feature) FROM deleted
 ) SELECT NULL FROM clear;
 
 --set client_min_messages to DEBUG;
@@ -102,7 +103,7 @@ WITH deleted AS (
   DELETE FROM features.traffic_signs WHERE feature_name IN ( 'S4' )
   RETURNING feature
 ), clear AS (
-  SELECT clearTopoGeom(feature) FROM deleted
+  SELECT topology.clearTopoGeom(feature) FROM deleted
 ) SELECT NULL FROM clear;
 
 --set client_min_messages to DEBUG;
@@ -124,16 +125,16 @@ start_point AS (
   FROM deleted
 ),
 clear AS (
-  SELECT sp, clearTopoGeom(feature)
+  SELECT sp, topology.clearTopoGeom(feature)
   FROM start_point
 )
 INSERT INTO features.traffic_signs ( feature_name, feature )
 SELECT
   'TS1',
-  toTopoGeom(
+  topology.toTopoGeom(
     sp,
     'city_data',
-    layer_id(findLayer('features', 'traffic_signs', 'feature')),
+    layer_id(topology.findLayer('features', 'traffic_signs', 'feature')),
     0
   )
 FROM clear;
@@ -174,12 +175,12 @@ WITH node AS (
   FROM features.traffic_signs WHERE feature_name = 'S1'
 ),
 triangle_right AS (
-  SELECT TopoGeo_addLineString( 'city_data',
+  SELECT topology.TopoGeo_addLineString( 'city_data',
     features.triangle(g, 4, 4)
   ) FROM node
 ),
 triangle_left AS (
-  SELECT TopoGeo_addLineString( 'city_data',
+  SELECT topology.TopoGeo_addLineString( 'city_data',
     features.triangle(g, -4, 4)
   ) FROM node
 )
@@ -194,7 +195,7 @@ WITH deleted AS (
   RETURNING feature
 ),
 clear AS (
-  SELECT clearTopoGeom(feature)
+  SELECT topology.clearTopoGeom(feature)
   FROM deleted
 )
 SELECT NULL FROM clear;
@@ -207,7 +208,7 @@ SELECT 't6', 'invalidity', * FROM topology.ValidateTopology('city_data');
 
 -- See https://trac.osgeo.org/postgis/ticket/5289
 SELECT NULL FROM (
-  SELECT toTopoGeom(
+  SELECT topology.toTopoGeom(
     ST_MakeLine(
       ST_EndPoint( ST_GeometryN(feature,1) ),
       ST_StartPoint( ST_GeometryN(feature,1) )
@@ -230,7 +231,7 @@ SELECT '#5289', 'invalidity', * FROM topology.ValidateTopology('city_data');
 -- being required as endpoint of closed edge 2) while
 -- edges themselves would still be both used by R4 feature.
 UPDATE features.city_streets
-SET feature = TopoGeom_addElement(feature, ARRAY[2, 2])
+SET feature = topology.TopoGeom_addElement(feature, ARRAY[2, 2])
 WHERE feature_name = 'R4';
 
 SELECT '#5303', 'clean', topology.RemoveUnusedPrimitives('city_data');
@@ -242,6 +243,6 @@ SELECT '#5303', 'invalidity', * FROM topology.ValidateTopology('city_data');
 -- Cleanup
 --
 
-SELECT NULL FROM DropTopology('city_data');
+SELECT NULL FROM topology.DropTopology('city_data');
 DROP SCHEMA features CASCADE;
-
+RESET search_path;

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

Summary of changes:
 NEWS                                               |  1 +
 topology/sql/cleanup/RemoveUnusedPrimitives.sql.in |  2 +-
 topology/test/regress/removeunusedprimitives.sql   | 27 +++++++++++-----------
 3 files changed, 16 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list