[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-68-g9691b2b2e

git at osgeo.org git at osgeo.org
Tue Aug 29 10:55:38 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, master has been updated
       via  9691b2b2efd64d2303b42329360f0a8a14345afa (commit)
      from  fd7c1b74f435ea123847bb5bdf1be2ab125a3619 (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 9691b2b2efd64d2303b42329360f0a8a14345afa
Author: Sandro Santilli <strk at kbt.io>
Date:   Tue Aug 29 17:45:50 2023 +0200

    Stop deprecating ST_DWithin(text) while not being deprecated
    
    Fixes availability/changed info for ST_DWithin(..geometry..)
    Add test for upgrades in presence of view using ST_DWithin(..geometry..)
    
    References #5494 in master branch (3.5.0dev)

diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index af3ad2bab..bce4c27f6 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -4635,9 +4635,10 @@ CREATE OR REPLACE FUNCTION ST_LineCrossingDirection(line1 geometry, line2 geomet
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_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)
+-- Availability: 1.3.0
+-- Changed: 2.0.0 added parameter names
+-- TODO: encode deprecation of the version with no parameter names ?
+CREATE OR REPLACE FUNCTION ST_DWithin(geom1 geometry, geom2 geometry, float8)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME', 'LWGEOM_dwithin'
 	SUPPORT postgis_index_supportfn
diff --git a/regress/hooks/hook-before-upgrade.sql b/regress/hooks/hook-before-upgrade.sql
index 49d0c8139..d841c3fba 100644
--- a/regress/hooks/hook-before-upgrade.sql
+++ b/regress/hooks/hook-before-upgrade.sql
@@ -50,13 +50,16 @@ SELECT
 	ST_AsKML(g2) as geography_askml
 FROM upgrade_test;
 
--- Add view using ST_DWithin function
--- NOTE: 3.0.0 changed them to add default params
+-- Add view using ST_DWithin functions
+-- See https://trac.osgeo.org/postgis/ticket/5494
 CREATE VIEW upgrade_view_test_dwithin AS
 SELECT
-	ST_DWithin(g1::text, g1::text, 1) as text_dwithin,
-	ST_DWithin(g2, g2, 1) as geography_dwithin
-FROM upgrade_test;
+	ST_DWithin(NULL::text, NULL::text, NULL::float8) as text_dwithin,
+	-- Available since 1.5.0, changed in 3.0.0 to add optional 4th use_spheroid param
+	ST_DWithin(NULL::geography, NULL::geography, NULL::float8) as geography_dwithin,
+	-- Available since 1.3.0
+	ST_DWithin(NULL::geometry, NULL::geometry, NULL::float8) as geometry_dwithin
+;
 
 -- Add view using ST_ClusterKMeans windowing function
 -- NOTE: 3.2.0 changed it to add max_radius parameter

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

Summary of changes:
 postgis/postgis.sql.in                |  7 ++++---
 regress/hooks/hook-before-upgrade.sql | 13 ++++++++-----
 2 files changed, 12 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list