[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-204-ged2e882

git at osgeo.org git at osgeo.org
Sun Jun 6 08:04:41 PDT 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  ed2e882e174ccfad4514dd4743e72711d58dc59e (commit)
       via  6c7a131dc729aef90ed313eeb35e064e3d7d5e61 (commit)
      from  423b519e1851eb630c57ffa242bf370edfb365ad (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 ed2e882e174ccfad4514dd4743e72711d58dc59e
Merge: 423b519 6c7a131
Author: kalenikaliaksandr <kalenik.aliaksandr at gmail.com>
Date:   Sun Jun 6 14:56:06 2021 +0000

    Merge 6c7a131dc729aef90ed313eeb35e064e3d7d5e61 into 423b519e1851eb630c57ffa242bf370edfb365ad


commit 6c7a131dc729aef90ed313eeb35e064e3d7d5e61
Author: kalenikaliaksandr <kalenik.aliaksandr at gmail.com>
Date:   Sun Jun 6 17:55:50 2021 +0300

    fix ST_DumpPoints to not overlook points (Closes #4925)
    
    Closes: #4925

diff --git a/NEWS b/NEWS
index 1de0ef3..10f05f1 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ PostGIS 3.2.0
   - #4628, Add an option to disable ANALYZE when loading shapefiles (Stefan Corneliu Petrea)
   - #4924, Faster ST_RemoveRepeatedPoints on large multipoints, O(NlogN) instead of O(N^2)
            (Aliaksandr Kalenik, Darafei Praliaskouski)
+  - #4925, fix ST_DumpPoints to not overlook points (Aliaksandr Kalenik)
 
  * New features*
   - #4841, FindTopology to quickly get a topology record (Sandro Santilli)
diff --git a/postgis/lwgeom_dumppoints.c b/postgis/lwgeom_dumppoints.c
index fa94b7e..0f9aabe 100644
--- a/postgis/lwgeom_dumppoints.c
+++ b/postgis/lwgeom_dumppoints.c
@@ -287,7 +287,6 @@ Datum LWGEOM_dumppoints(PG_FUNCTION_ARGS) {
 		/* no more geometries in the current collection */
 		if (--state->stacklen == 0) SRF_RETURN_DONE(funcctx);
 		state->pathlen--;
-		state->stack[state->stacklen-1].idx++;
 	}
 }
 
diff --git a/regress/core/dumppoints.sql b/regress/core/dumppoints.sql
index a6ecff6..62e6ea1 100644
--- a/regress/core/dumppoints.sql
+++ b/regress/core/dumppoints.sql
@@ -183,3 +183,17 @@ SELECT '#2704', ST_DumpPoints('MULTIPOLYGON EMPTY'::geometry);
 SELECT '#2704', ST_DumpPoints('MULTILINESTRING EMPTY'::geometry);
 SELECT '#2704', ST_DumpPoints('LINESTRING EMPTY'::geometry);
 SELECT '#2704', ST_DumpPoints('GEOMETRYCOLLECTION EMPTY'::geometry);
+
+SELECT path, ST_AsText(geom)
+FROM (
+         SELECT (ST_DumpPoints(g.geom)).*
+         FROM (SELECT 'GEOMETRYCOLLECTION(
+          POINT(11 11),
+          GEOMETRYCOLLECTION EMPTY,
+          POINT(22 22),
+          GEOMETRYCOLLECTION EMPTY,
+          POINT(33 33),
+          POINT(44 44)
+        )'::geometry AS geom
+              ) AS g
+     ) j;
diff --git a/regress/core/dumppoints_expected b/regress/core/dumppoints_expected
index a1e9fc2..824dc96 100644
--- a/regress/core/dumppoints_expected
+++ b/regress/core/dumppoints_expected
@@ -100,3 +100,7 @@
 {2,2}|POINT(3 3)
 {2,3}|POINT(3 1)
 {2,4}|POINT(1 1)
+{1,1}|POINT(11 11)
+{3,1}|POINT(22 22)
+{5,1}|POINT(33 33)
+{6,1}|POINT(44 44)

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

Summary of changes:
 NEWS                             |  1 +
 postgis/lwgeom_dumppoints.c      |  1 -
 regress/core/dumppoints.sql      | 14 ++++++++++++++
 regress/core/dumppoints_expected |  4 ++++
 4 files changed, 19 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list