[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-39-g2039722

git at osgeo.org git at osgeo.org
Mon Jan 11 03:27:13 PST 2021


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  2039722000192f082a29a32dce47dd4f899edb93 (commit)
      from  3c72b78a4bee798167aa91c8889d59624efa2e49 (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 2039722000192f082a29a32dce47dd4f899edb93
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Jan 11 12:21:17 2021 +0100

    Simplify queries in ValidateTopology to avoid EXECUTE

diff --git a/topology/topology.sql.in b/topology/topology.sql.in
index 30111cb..03b4370 100644
--- a/topology/topology.sql.in
+++ b/topology/topology.sql.in
@@ -1616,9 +1616,9 @@ BEGIN
        'face_check (face_id);';
 
   -- Scan the table looking for NULL geometries
-  FOR rec IN EXECUTE
-    'SELECT f1.face_id FROM '
-       'face_check f1 WHERE f1.geom IS NULL OR ST_IsEmpty(f1.geom)'
+  FOR rec IN
+    SELECT face_id FROM face_check
+    WHERE geom IS NULL OR ST_IsEmpty(geom)
   LOOP
     -- Face missing !
     retrec.error := 'face has no rings';
@@ -1629,14 +1629,17 @@ BEGIN
 
   -- Scan the table looking for overlap or containment
   -- TODO: also check for MBR consistency
-  FOR rec IN EXECUTE
-    'SELECT f1.geom, f1.face_id as id1, f2.face_id as id2, '
-       ' ST_Relate(f1.geom, f2.geom) as im'
-       ' FROM '
-       'face_check f1, '
-       'face_check f2 '
-       'WHERE f1.face_id < f2.face_id'
-       ' AND f1.geom && f2.geom'
+  FOR rec IN
+    SELECT
+      f1.geom,
+      f1.face_id as id1,
+      f2.face_id as id2,
+      ST_Relate(f1.geom, f2.geom) as im
+    FROM
+      face_check f1,
+      face_check f2
+      WHERE f1.face_id < f2.face_id
+      AND f1.geom && f2.geom
   LOOP
 
     -- Face overlap

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

Summary of changes:
 topology/topology.sql.in | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list