[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.4-22-g1e33d3f57

git at osgeo.org git at osgeo.org
Fri May 12 07:54:16 PDT 2023


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.2 has been updated
       via  1e33d3f57d947d49e74880a34e3fbbef4c875d67 (commit)
       via  2eeb1757166930ba13a2bbd111e21e2a9826d9bb (commit)
      from  94040e3fcd138baae5c86c004853393601724dfa (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 1e33d3f57d947d49e74880a34e3fbbef4c875d67
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri May 12 12:28:18 2023 +0200

    Fix 2.5 upgrades with views using geography based ST_Distance
    
    Include tests
    References #5380 in 3.2 branch (3.2.5dev)

diff --git a/NEWS b/NEWS
index 7ec82f71b..a8b3917cc 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ Additional features are enabled if you are running GEOS 3.9+
 Proj 6.1+, and PostgreSQL 14+.
 
 * Bug Fixes *
+  - #5380, Fix 2.5 upgrades with views using geography based ST_Distance
+           (Sandro Santilli)
   - #5106, Fix segfault in ST_RemEdgeNewFace/ST_RemEdgeModFace
            when no edge side-faces are found (Sandro Santilli)
   - #5313, Fix memory access issue in ST_InterpolateRaster (Paul Ramsey)
diff --git a/postgis/geography.sql.in b/postgis/geography.sql.in
index c6e66d3eb..bc3062e50 100644
--- a/postgis/geography.sql.in
+++ b/postgis/geography.sql.in
@@ -491,6 +491,7 @@ CREATE OR REPLACE FUNCTION ST_AsGeoJson(text)
 -- Availability: 1.5.0
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 
+-- Replaces ST_Distance(geography, geography) deprecated in 3.0.0
 CREATE OR REPLACE FUNCTION ST_Distance(geog1 geography, geog2 geography, use_spheroid boolean DEFAULT true)
 	RETURNS float8
 	AS 'MODULE_PATHNAME','geography_distance'
diff --git a/postgis/postgis_after_upgrade.sql b/postgis/postgis_after_upgrade.sql
index 44772dd0e..d7669e9a2 100644
--- a/postgis/postgis_after_upgrade.sql
+++ b/postgis/postgis_after_upgrade.sql
@@ -191,7 +191,7 @@ DROP FUNCTION IF EXISTS _ST_DistanceRectTree(g1 geometry, g2 geometry);
 DROP FUNCTION IF EXISTS _ST_DistanceRectTreeCached(g1 geometry, g2 geometry);
 
 -- Deplicative signatures removed
-DROP FUNCTION IF EXISTS ST_Distance(geography, geography);
+DROP FUNCTION IF EXISTS ST_Distance(geography, geography); -- dropped in PostGIS-3.0 (r17300 aka ce70e4906)
 DROP FUNCTION IF EXISTS ST_Distance(geography, geography, float8, boolean);
 DROP FUNCTION IF EXISTS ST_Buffer(geometry, float8, cstring);
 DROP FUNCTION IF EXISTS ST_IsValidDetail(geometry);
diff --git a/regress/hooks/hook-after-upgrade.sql b/regress/hooks/hook-after-upgrade.sql
index 7f95eb762..b639ff77c 100644
--- a/regress/hooks/hook-after-upgrade.sql
+++ b/regress/hooks/hook-after-upgrade.sql
@@ -6,6 +6,7 @@ DROP VIEW IF EXISTS upgrade_view_test_force_dims;
 DROP VIEW IF EXISTS upgrade_view_test_askml;
 DROP VIEW IF EXISTS upgrade_view_test_dwithin;
 DROP VIEW IF EXISTS upgrade_view_test_clusterkmeans;
+DROP VIEW IF EXISTS upgrade_view_test_distance;
 DROP TABLE upgrade_test;
 
 -- Drop functions deprecated on upgrade
diff --git a/regress/hooks/hook-before-upgrade.sql b/regress/hooks/hook-before-upgrade.sql
index f15b71111..f590f9401 100644
--- a/regress/hooks/hook-before-upgrade.sql
+++ b/regress/hooks/hook-before-upgrade.sql
@@ -82,6 +82,15 @@ SELECT
 	ST_ClusterKMeans(g1, 1) OVER ()
 FROM upgrade_test;
 
+-- This view uses ST_Distance signatures, available since 1.5.0
+-- NOTE: 3.0.0 changed them to use default arguments
+-- See https://trac.osgeo.org/postgis/ticket/5380
+CREATE VIEW upgrade_view_test_distance AS
+SELECT
+	ST_Distance(g2, g2) geog_dist1,
+	ST_Distance(g2, g2, true) geog_dist2
+FROM upgrade_test;
+
 -- Break probin of all postgis functions, as we expect
 -- the upgrade procedure to replace them all
 UPDATE pg_proc SET probin = probin || '-uninstalled'

commit 2eeb1757166930ba13a2bbd111e21e2a9826d9bb
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri May 12 15:19:46 2023 +0200

    Encode dependency of postgis.sql on its effective sources

diff --git a/postgis/Makefile.in b/postgis/Makefile.in
index dbf1e4b36..b3f3969e0 100644
--- a/postgis/Makefile.in
+++ b/postgis/Makefile.in
@@ -250,7 +250,7 @@ postgis_upgrade.sql: postgis_before_upgrade.sql postgis_upgrade.sql.in postgis_a
 # SQL objects are also dependent on postgis_config.h for PostgreSQL version
 $(SQL_OBJS): ../postgis_config.h ../postgis_revision.h
 
-#postgis.sql.in: sqldefines.h long_xact.sql.in.c geography.sql.in.c
+postgis.sql: sqldefines.h long_xact.sql.in geography.sql.in postgis_brin.sql.in postgis_spgist.sql.in
 
 uninstall_postgis.sql: postgis.sql ../utils/create_undef.pl
 	$(PERL) ../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@

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

Summary of changes:
 NEWS                                  | 2 ++
 postgis/Makefile.in                   | 2 +-
 postgis/geography.sql.in              | 1 +
 postgis/postgis_after_upgrade.sql     | 2 +-
 regress/hooks/hook-after-upgrade.sql  | 1 +
 regress/hooks/hook-before-upgrade.sql | 9 +++++++++
 6 files changed, 15 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list