[SCM] PostGIS branch stable-3.3 updated. 3.3.7-64-g38c2ccb5e
git at osgeo.org
git at osgeo.org
Mon Dec 22 05:20:18 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.3 has been updated
via 38c2ccb5ea604ac456e3297be39663d0cbbce58e (commit)
from 97f63fdcda8ae90007f5310d2e9e832afe507da7 (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 38c2ccb5ea604ac456e3297be39663d0cbbce58e
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.
Closes #6027 in stable-3.3 branch (3.3.9dev)
diff --git a/NEWS b/NEWS
index e9cfdb1f4..cd969c30f 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,7 @@ Proj 4.9+ required.
- #5991, CircularString distance error (Paul Ramsey)
- #5962, Consistent clipping of MULTI/POINT (Paul Ramsey)
- #5989, CurvePolygon distance error (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 69b6afcd8..1c864dec9 100644
--- a/topology/sql/cleanup/RemoveUnusedPrimitives.sql.in
+++ b/topology/sql/cleanup/RemoveUnusedPrimitives.sql.in
@@ -27,7 +27,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