[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.4-11-g088de39c6

git at osgeo.org git at osgeo.org
Wed Aug 30 02:31:22 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.3 has been updated
       via  088de39c64d826c78d1f771c7962c603be28d27b (commit)
      from  ae0e17c05f15f67e2544a71a21f4ae4421ce4b2e (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 088de39c64d826c78d1f771c7962c603be28d27b
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 3.3 branch (3.3.5dev)

diff --git a/NEWS b/NEWS
index 57ded465a..c59d501af 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ YYYY/MM/DD
  - #5442, [postgis_tiger_geocoder,postgis_topology]
           Database search_path does not do
           what it intends to do (Jelte Fennema)
+ - #5494, Fix double-upgrade with view using st_dwithin(text, ...)
+          (Sandro Santilli)
 
 PostGIS 3.3.4
 2023/07/28
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 88a246d33..87832fcc1 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -4449,9 +4449,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 f590f9401..4c620266a 100644
--- a/regress/hooks/hook-before-upgrade.sql
+++ b/regress/hooks/hook-before-upgrade.sql
@@ -67,13 +67,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:
 NEWS                                  |  2 ++
 postgis/postgis.sql.in                |  7 ++++---
 regress/hooks/hook-before-upgrade.sql | 13 ++++++++-----
 3 files changed, 14 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list