[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-63-g99ddb20a4

git at osgeo.org git at osgeo.org
Mon Aug 28 14:41:46 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  99ddb20a49b739c4f6d566d14359b3f8dfa5fd42 (commit)
      from  e1b7db45486fea9cb3c0be8d58cbd2a785b631f4 (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 99ddb20a49b739c4f6d566d14359b3f8dfa5fd42
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
    
    References #5489 in master branch (3.5.0dev)

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:
 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 ++++++++-
 4 files changed, 31 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list