[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-659-gd937e7245
git at osgeo.org
git at osgeo.org
Mon Mar 28 14:08:31 PDT 2022
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 d937e7245d3b4314ff9f61d00d03af52f76a5d83 (commit)
from b6b188849a2b9e1af37cd560a8fae8455e3db43b (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 d937e7245d3b4314ff9f61d00d03af52f76a5d83
Author: Sandro Santilli <strk at kbt.io>
Date: Mon Mar 28 23:07:58 2022 +0200
Fix missing TopoGeometries count with wrong topology_id in deploy tables
Includes regress test
diff --git a/topology/sql/manage/TopologySummary.sql.in b/topology/sql/manage/TopologySummary.sql.in
index 47c64496f..ebca1f33e 100644
--- a/topology/sql/manage/TopologySummary.sql.in
+++ b/topology/sql/manage/TopologySummary.sql.in
@@ -152,13 +152,15 @@ SELECT count(*) FROM (
SELECT DISTINCT id(%3$I)
FROM %4$I.%5$I
WHERE layer_id(%3$I) = %2$L
+ AND topology_id(%3$I) = %6$L
) as foo
$$,
atopology,
rec.layer_id,
rec.feature_column,
rec.schema_name,
- rec.table_name
+ rec.table_name,
+ var_topology_id
);
BEGIN
RAISE DEBUG 'Executing %', sql;
diff --git a/topology/test/regress/topologysummary.sql b/topology/test/regress/topologysummary.sql
index bce065cde..0f57ff7c0 100644
--- a/topology/test/regress/topologysummary.sql
+++ b/topology/test/regress/topologysummary.sql
@@ -25,7 +25,9 @@ ALTER TABLE test.t ADD c TopoGeometry;
SELECT E'--registered_layer_missing_topogeom--\n' || TopologySummary('test');
INSERT INTO test.t(c) VALUES ( (1,2,1,1) );
SELECT E'--registered_layer_missing_topogeom_in_proper_layer--\n' || TopologySummary('test');
-UPDATE test.t SET c.layer_id = 1 WHERE layer_id(c) = 2;
+UPDATE test.t SET c.layer_id = 1, c.topology_id = topology_id(c)+1 WHERE layer_id(c) = 2;
+SELECT E'--registered_layer_missing_topogeom_in_proper_topo--\n' || TopologySummary('test');
+UPDATE test.t SET c.topology_id = topology_id(c)-1 WHERE layer_id(c) = 1;
SELECT E'--registered_layer--\n' || TopologySummary('test');
-- TODO: test hierarchical
DROP TABLE test.t;
diff --git a/topology/test/regress/topologysummary_expected b/topology/test/regress/topologysummary_expected
index e5454d723..4cd90d36e 100644
--- a/topology/test/regress/topologysummary_expected
+++ b/topology/test/regress/topologysummary_expected
@@ -45,6 +45,11 @@ Layer 1, type Puntal (1), 1 topogeoms
--registered_layer_missing_topogeom_in_proper_layer--
Topology test (id 1, SRID 10, precision 20)
0 nodes, 0 edges, 0 faces, 1 topogeoms in 1 layers
+Layer 1, type Puntal (1), 1 topogeoms
+ Deploy: test.t.c (1 missing topogeoms)
+--registered_layer_missing_topogeom_in_proper_topo--
+Topology test (id 1, SRID 10, precision 20)
+0 nodes, 0 edges, 0 faces, 1 topogeoms in 1 layers
Layer 1, type Puntal (1), 1 topogeoms
Deploy: test.t.c (1 missing topogeoms)
--registered_layer--
-----------------------------------------------------------------------
Summary of changes:
topology/sql/manage/TopologySummary.sql.in | 4 +++-
topology/test/regress/topologysummary.sql | 4 +++-
topology/test/regress/topologysummary_expected | 5 +++++
3 files changed, 11 insertions(+), 2 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list