[postgis-tickets] [SCM] PostGIS branch stable-3.4 updated. 3.4.0-9-gd20df6a22
git at osgeo.org
git at osgeo.org
Wed Aug 30 01:57:30 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.4 has been updated
via d20df6a22bf075b1a08eaa0ed816f3977fe67bd4 (commit)
from 2bf50fa5fc6527d5597077937a3d77e6721b54aa (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 d20df6a22bf075b1a08eaa0ed816f3977fe67bd4
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..)
Closes #5494 in 3.4 branch (3.4.1dev)
diff --git a/NEWS b/NEWS
index b1b365d99..4f8ebbcfb 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ To take advantage of all SFCGAL featurs, SFCGAL 1.4.1+ is needed.
* Bug Fixes *
+ - #5494, Fix double-upgrade with view using st_dwithin(text, ...)
+ (Sandro Santilli)
- #5491, Fix upgrade with view using st_aspect(raster, ...)
(Sandro Santilli)
- #5490, Fix upgrade with view using st_slope(raster, ...)
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index c79ed40cb..ab970a5b6 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -4622,9 +4622,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:
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