[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.4-23-g002a55f46

git at osgeo.org git at osgeo.org
Mon Dec 27 01:56:47 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, stable-3.1 has been updated
       via  002a55f46286adff7ccf21889d9906cd9df537c4 (commit)
      from  3cd3b5e5a5c063a127f36a805a81af36a89aced9 (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 002a55f46286adff7ccf21889d9906cd9df537c4
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Dec 22 22:12:18 2021 +0100

    Add support for upgrading in presence of views using deprecated ST_DWithin
    
    Closes #5035 in 3.1 branch (3.1.5dev)

diff --git a/NEWS b/NEWS
index 7ede9e599..6681117a7 100644
--- a/NEWS
+++ b/NEWS
@@ -7,7 +7,7 @@ PostGIS 3.1.5
   - #5018, pgsql2shp basic support for WITH CTE clause (Regina Obe)
   - #5026, fix DropTopology in presence of UPDATE triggers on
            topology layers (Sandro Santilli)
-  - #5033, allow upgrades in presence of views using deprecated
+  - #5033, #5035, allow upgrades in presence of views using deprecated
            functions (Sandro Santilli)
 
 PostGIS 3.1.4
diff --git a/postgis/geography.sql.in b/postgis/geography.sql.in
index 7d7b6da5f..97b464460 100644
--- a/postgis/geography.sql.in
+++ b/postgis/geography.sql.in
@@ -808,6 +808,8 @@ CREATE OR REPLACE FUNCTION ST_Covers(geog1 geography, geog2 geography)
 	_COST_HIGH;
 
 -- Availability: 1.5.0
+-- Changed: 3.0.0 to use default and named args
+-- Replaces ST_DWithin(geography, geography, float8) deprecated in 3.0.0
 CREATE OR REPLACE FUNCTION ST_DWithin(geog1 geography, geog2 geography, tolerance float8, use_spheroid boolean DEFAULT true)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME','geography_dwithin'
@@ -831,7 +833,7 @@ CREATE OR REPLACE FUNCTION ST_Intersects(geog1 geography, geog2 geography)
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_HIGH;
 
-#else
+#else /* POSTGIS_PGSQL_VERSION < 120 */
 
 -- Only implemented for polygon-over-point
 -- Availability: 1.5.0
@@ -848,6 +850,8 @@ CREATE OR REPLACE FUNCTION ST_CoveredBy(geog1 geography, geog2 geography)
 	LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
 -- Availability: 1.5.0
+-- Changed: 3.0.0 to use default and named args
+-- Replaces ST_DWithin(geography, geography, float8) deprecated in 3.0.0
 CREATE OR REPLACE FUNCTION ST_DWithin(geog1 geography, geog2 geography, tolerance float8, use_spheroid boolean DEFAULT true)
 	RETURNS boolean
 	AS 'SELECT $1 OPERATOR(@extschema at .&&) @extschema at ._ST_Expand($2,$3) AND $2 OPERATOR(@extschema at .&&) @extschema at ._ST_Expand($1,$3) AND @extschema at ._ST_DWithin($1, $2, $3, $4)'
@@ -858,7 +862,7 @@ CREATE OR REPLACE FUNCTION ST_Intersects(geography, geography)
 	AS 'SELECT $1 OPERATOR(@extschema at .&&) $2 AND @extschema at .ST_Distance($1, $2, false) < 0.00001'
 	LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
-#endif
+#endif /* POSTGIS_PGSQL_VERSION < 120 */
 
 -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
 CREATE OR REPLACE FUNCTION ST_Covers(text, text)
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index dc08f1166..75ccc135b 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -4293,6 +4293,7 @@ CREATE OR REPLACE FUNCTION ST_LineCrossingDirection(line1 geometry, line2 geomet
 	_COST_HIGH;
 
 -- Availability: 1.3.4
+-- Replaces ST_DWithin(text, text, float8) deprecated in 3.0.0
 CREATE OR REPLACE FUNCTION ST_DWithin(geom1 geometry, geom2 geometry,float8)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME', 'LWGEOM_dwithin'
diff --git a/postgis/postgis_after_upgrade.sql b/postgis/postgis_after_upgrade.sql
index a7b929ffd..b7a464f66 100644
--- a/postgis/postgis_after_upgrade.sql
+++ b/postgis/postgis_after_upgrade.sql
@@ -116,7 +116,6 @@ DROP FUNCTION IF EXISTS st_box3d(geometry);
 DROP FUNCTION IF EXISTS st_box(geometry);
 DROP FUNCTION IF EXISTS _st_buffer(geometry, float8, cstring); -- dropped in PostGIS-3.0 (r17300)
 DROP FUNCTION IF EXISTS ST_ConcaveHull(geometry,float); -- this one changed to use default parameters
-DROP FUNCTION IF EXISTS ST_DWithin(geography, geography, float8); -- this one changed to use default parameters
 DROP FUNCTION IF EXISTS st_text(geometry);
 DROP FUNCTION IF EXISTS st_geometry(box2d);
 DROP FUNCTION IF EXISTS st_geometry(box3d);

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

Summary of changes:
 NEWS                              | 2 +-
 postgis/geography.sql.in          | 8 ++++++--
 postgis/postgis.sql.in            | 1 +
 postgis/postgis_after_upgrade.sql | 1 -
 4 files changed, 8 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list