[postgis-tickets] [SCM] PostGIS branch stable-3.4 updated. 3.4.0-6-gdf07c2995
git at osgeo.org
git at osgeo.org
Mon Aug 28 14:44:10 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 df07c2995551ca80157333a9b366261871476f82 (commit)
from d2687d2d8138983cebaa2deafa5ebf428174d5f0 (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 df07c2995551ca80157333a9b366261871476f82
Author: Sandro Santilli <strk at kbt.io>
Date: Mon Aug 28 22:40:35 2023 +0200
Fix upgrades in presence of views using st_intersects(..raster..)
Includes regress tests
Closes #5489 in 3.4 branch (3.4.1dev)
diff --git a/NEWS b/NEWS
index 9d4395938..af10acfe9 100644
--- a/NEWS
+++ b/NEWS
@@ -6,8 +6,12 @@ To take advantage of all SFCGAL featurs, SFCGAL 1.4.1+ is needed.
* Bug Fixes *
+ - #5489, Fix upgrade with view using st_intersects(raster, ...)
+ (Sandro Santilli)
- #5488, Fix upgrade with view using st_clip(raster, ...)
+ (Sandro Santilli)
- #5484, Fix upgrade with view using st_value(raster,geometry,bool)
+ (Sandro Santilli)
- #5479, postgis_full_version() and postgis_gdal_version() sometimes
warn of deprecated SRID: 2163 (Regina Obe)
diff --git a/raster/rt_pg/rtpostgis_drop.sql.in b/raster/rt_pg/rtpostgis_drop.sql.in
index 5f4a8f9aa..ef6a57ada 100644
--- a/raster/rt_pg/rtpostgis_drop.sql.in
+++ b/raster/rt_pg/rtpostgis_drop.sql.in
@@ -48,12 +48,21 @@ DROP AGGREGATE IF EXISTS ST_Union(raster, text, text);
DROP AGGREGATE IF EXISTS ST_Union(raster, text, text, text, double precision);
DROP AGGREGATE IF EXISTS ST_Union(raster, record[]);
+-- Removed in 2.0.0 ? see ticket #5489
DROP FUNCTION IF EXISTS ST_Intersects(raster,boolean,geometry);
+-- Removed in 2.0.0 ? see ticket #5489
DROP FUNCTION IF EXISTS ST_Intersects(geometry,raster,boolean);
+-- Removed in 2.0.0 ? see ticket #5489
DROP FUNCTION IF EXISTS ST_Intersects(raster,geometry);
+-- Removed in 2.0.0 ? see ticket #5489
DROP FUNCTION IF EXISTS ST_Intersects(geometry,raster);
+-- Removed in 2.0.0 ? see ticket #5489
DROP FUNCTION IF EXISTS ST_Intersects(raster, integer, boolean, geometry);
+-- Removed in 2.0.0 ? see ticket #5489
DROP FUNCTION IF EXISTS ST_Intersects(geometry, raster, integer, boolean);
+-- Removed in 2.1.0, see ticket #5489
+DROP FUNCTION IF EXISTS _st_intersects(raster, geometry, integer);
+
DROP FUNCTION IF EXISTS ST_Intersection(raster,raster, integer, integer);
DROP FUNCTION IF EXISTS ST_Intersection(geometry,raster);
diff --git a/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in b/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
index bed083b66..fcde527e2 100644
--- a/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
+++ b/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
@@ -433,9 +433,15 @@ CREATE OR REPLACE FUNCTION _drop_st_samealignment()
SELECT _drop_st_samealignment();
DROP FUNCTION _drop_st_samealignment();
-DROP FUNCTION IF EXISTS _st_intersects(raster, integer, raster, integer);
-DROP FUNCTION IF EXISTS st_intersects(raster, integer, raster, integer);
-DROP FUNCTION IF EXISTS st_intersects(raster, raster);
+--DROP FUNCTION IF EXISTS _st_intersects(geometry, raster, integer); --------- sig1, not changed since 2.0.0, see ticket #5489
+--DROP FUNCTION IF EXISTS _st_intersects(raster, integer, raster, integer); -- sig2, not changed since 2.0.0, see ticket #5489
+
+--DROP FUNCTION IF EXISTS st_intersects(raster, integer, raster, integer); -- sig1, not changed since 2.0.0, see ticket #5489
+--DROP FUNCTION IF EXISTS st_intersects(raster, raster); -------------------- sig2, not changed since 2.0.0, see ticket #5489
+--DROP FUNCTION IF EXISTS st_intersects(geometry, raster, integer); --------- sig3, not changed since 2.0.0, see ticket #5489
+--DROP FUNCTION IF EXISTS st_intersects(raster, geometry, integer); --------- sig4, not changed since 2.0.0, see ticket #5489
+--DROP FUNCTION IF EXISTS st_intersects(raster, integer, geometry); --------- sig5, not changed since 2.0.0, see ticket #5489
+
-- functions have changed dramatically
DROP FUNCTION IF EXISTS st_intersection(raster, integer, geometry);
@@ -452,9 +458,9 @@ DROP FUNCTION IF EXISTS st_intersection(raster, int, geometry, text, regprocedur
DROP FUNCTION IF EXISTS st_intersection(raster, int, geometry, regprocedure);
DROP FUNCTION IF EXISTS st_intersection(raster, geometry, text, regprocedure);
DROP FUNCTION IF EXISTS st_intersection(raster, geometry, regprocedure);
---DROP FUNCTION IF EXISTS st_clip(raster, geometry, float8, boolean); --------- sig5, not changed since 2.0.0, maybe changed before ?
---DROP FUNCTION IF EXISTS st_clip(raster, geometry, boolean); ----------------- sig6, not changed since 2.0.0, maybe changed before ?
---DROP FUNCTION IF EXISTS st_clip(raster, geometry, float8[], boolean); ------- sig4, not changed since 2.0.0, maybe changed before ?
+--DROP FUNCTION IF EXISTS st_clip(raster, geometry, float8, boolean); --------- sig5, not changed since 2.0.0, see ticket #5488
+--DROP FUNCTION IF EXISTS st_clip(raster, geometry, boolean); ----------------- sig6, not changed since 2.0.0, see ticket #5488
+--DROP FUNCTION IF EXISTS st_clip(raster, geometry, float8[], boolean); ------- sig4, not changed since 2.0.0, see ticket #5488
-- refactoring of functions
DROP FUNCTION IF EXISTS _st_dumpaswktpolygons(raster, integer);
@@ -480,13 +486,6 @@ DROP FUNCTION IF EXISTS st_pixelaspolygons(raster, integer);
-- function deprecated
DROP FUNCTION IF EXISTS st_bandsurface(raster, integer);
--- function no longer exist or refactored
-DROP FUNCTION IF EXISTS st_intersects(raster, integer, geometry);
-DROP FUNCTION IF EXISTS st_intersects(raster, geometry, integer);
-DROP FUNCTION IF EXISTS st_intersects(geometry, raster, integer);
-DROP FUNCTION IF EXISTS _st_intersects(raster, geometry, integer);
-DROP FUNCTION IF EXISTS _st_intersects(geometry, raster, integer);
-
-- function no longer exists
DROP FUNCTION IF EXISTS st_overlaps(geometry, raster, integer);
DROP FUNCTION IF EXISTS st_overlaps(raster, integer, geometry);
diff --git a/raster/test/regress/hooks/hook-after-upgrade-raster.sql b/raster/test/regress/hooks/hook-after-upgrade-raster.sql
index b044120f7..bb94684ae 100644
--- a/raster/test/regress/hooks/hook-after-upgrade-raster.sql
+++ b/raster/test/regress/hooks/hook-after-upgrade-raster.sql
@@ -1,10 +1,9 @@
DROP VIEW upgrade_test_raster_view_st_value;
DROP VIEW upgrade_test_raster_view_st_clip;
+DROP VIEW upgrade_test_raster_view_st_intersects;
DROP TABLE upgrade_test_raster;
DROP TABLE upgrade_test_raster_with_regular_blocking;
-- Drop functions deprecated on upgrade
DROP FUNCTION IF EXISTS st_value_deprecated_by_postgis_201(raster,geometry,boolean);
-
---DROP FUNCTION IF EXISTS st_value_deprecated_by_postgis_201(raster,geometry,boolean);
diff --git a/raster/test/regress/hooks/hook-before-upgrade-raster.sql b/raster/test/regress/hooks/hook-before-upgrade-raster.sql
index c445200c8..305bd7d05 100644
--- a/raster/test/regress/hooks/hook-before-upgrade-raster.sql
+++ b/raster/test/regress/hooks/hook-before-upgrade-raster.sql
@@ -40,7 +40,6 @@ SELECT
FROM upgrade_test_raster;
-- See https://trac.osgeo.org/postgis/ticket/5488
--- st_clip(raster,integer,geometry,double precision,boolean)
CREATE VIEW upgrade_test_raster_view_st_clip AS
SELECT
-- signature dropped in PostGIS-2.1.0
@@ -52,3 +51,12 @@ SELECT
st_clip(NULL::raster, NULL::geometry, NULL::float8[], NULL::boolean) sig4,
st_clip(NULL::raster, NULL::geometry, NULL::float8, NULL::boolean) sig5,
st_clip(NULL::raster, NULL::geometry, NULL::boolean) sig6;
+
+-- See https://trac.osgeo.org/postgis/ticket/5489
+CREATE VIEW upgrade_test_raster_view_st_intersects AS
+SELECT
+ st_intersects(NULL::raster, NULL::int, NULL::raster, NULL::integer) sig1,
+ st_intersects(NULL::raster, NULL::raster) sig2,
+ st_intersects(NULL::geometry, NULL::raster, NULL::int) sig3,
+ st_intersects(NULL::raster, NULL::geometry, NULL::int) sig4,
+ st_intersects(NULL::raster, NULL::int, NULL::geometry) sig5;
-----------------------------------------------------------------------
Summary of changes:
NEWS | 4 ++++
raster/rt_pg/rtpostgis_drop.sql.in | 9 ++++++++
raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in | 25 +++++++++++-----------
.../regress/hooks/hook-after-upgrade-raster.sql | 3 +--
.../regress/hooks/hook-before-upgrade-raster.sql | 10 ++++++++-
5 files changed, 35 insertions(+), 16 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list