[SCM] PostGIS branch master updated. 3.4.0rc1-853-ge94b8f2ab

git at osgeo.org git at osgeo.org
Thu Dec 14 06:25:54 PST 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  e94b8f2ab1f2560f9d2bb94401d5b5bb1c840e72 (commit)
       via  86a56deffabe9ecc6088e78fb5350f76118fe9cc (commit)
      from  9f2c47c9364a35caf3737e0cd18d3e3ccbaba67f (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 e94b8f2ab1f2560f9d2bb94401d5b5bb1c840e72
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Dec 14 14:41:45 2023 +0100

    Re-add raster upgrade test view dropped in 4fa9e106e
    
    References #5488
    References #5496

diff --git a/raster/test/regress/hooks/hook-after-upgrade-raster.sql b/raster/test/regress/hooks/hook-after-upgrade-raster.sql
index 03bf5b9cd..0f3771f5c 100644
--- a/raster/test/regress/hooks/hook-after-upgrade-raster.sql
+++ b/raster/test/regress/hooks/hook-after-upgrade-raster.sql
@@ -1,4 +1,5 @@
 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;
@@ -7,5 +8,5 @@ DROP TABLE upgrade_test_raster_with_regular_blocking;
 DROP VIEW upgrade_test_raster_view_st_slope;
 DROP VIEW upgrade_test_raster_view_st_aspect;
 
--- Drop functions deprecated on upgrade
-DROP FUNCTION IF EXISTS st_value_deprecated_by_postgis_201(raster,geometry,boolean);
+-- Drop deprecated functions
+\i :regdir/hooks/drop-deprecated-functions.sql
diff --git a/raster/test/regress/hooks/hook-before-upgrade-raster.sql b/raster/test/regress/hooks/hook-before-upgrade-raster.sql
index 7abd27a7c..d2aa997f9 100644
--- a/raster/test/regress/hooks/hook-before-upgrade-raster.sql
+++ b/raster/test/regress/hooks/hook-before-upgrade-raster.sql
@@ -38,6 +38,19 @@ SELECT
 	ST_Value(r, ST_MakePoint(0, 0))
 FROM upgrade_test_raster;
 
+--- See https://trac.osgeo.org/postgis/ticket/5488
+CREATE VIEW upgrade_test_raster_view_st_clip AS
+SELECT
+       -- signature dropped in PostGIS-2.1.0
+       --st_clip(NULL::raster, NULL::int, NULL::geometry, NULL::float8[], NULL::boolean),
+       -- sig1 new in PostGIS-2.1.0
+       --st_clip(NULL::raster, NULL::int[], NULL::geometry, NULL::float8[], NULL::boolean),
+       st_clip(NULL::raster, NULL::int, NULL::geometry, NULL::float8, NULL::boolean) sig2,
+       st_clip(NULL::raster, NULL::int, NULL::geometry, NULL::boolean) sig3,
+       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
diff --git a/regress/hooks/drop-deprecated-functions.sql b/regress/hooks/drop-deprecated-functions.sql
new file mode 100644
index 000000000..770aafab5
--- /dev/null
+++ b/regress/hooks/drop-deprecated-functions.sql
@@ -0,0 +1,22 @@
+-- Drop functions deprecated on upgrade, if possible (could be possible later)
+DO LANGUAGE 'plpgsql' $DROPALL$
+DECLARE
+	rec pg_catalog.pg_proc;
+BEGIN
+	FOR rec IN
+		SELECT * FROM pg_catalog.pg_proc
+		WHERE proname ~ '_deprecated_by_postgis'
+	LOOP
+		RAISE NOTICE 'Dropping function %', rec.oid::regprocedure;
+		BEGIN
+			EXECUTE pg_catalog.format('DROP FUNCTION %s', rec.oid::regprocedure);
+		EXCEPTION
+		WHEN dependent_objects_still_exist THEN
+			RAISE NOTICE 'Could not drop function % as dependent objects still exist', rec.oid::regprocedure;
+		WHEN OTHERS THEN
+			RAISE EXCEPTION 'Got % (%)', SQLERRM, SQLSTATE;
+		END;
+	END LOOP;
+END;
+$DROPALL$;
+
diff --git a/regress/hooks/hook-after-upgrade.sql b/regress/hooks/hook-after-upgrade.sql
index c0516610d..64ce9d770 100644
--- a/regress/hooks/hook-after-upgrade.sql
+++ b/regress/hooks/hook-after-upgrade.sql
@@ -13,17 +13,5 @@ DROP TABLE IF EXISTS upgrade_test;
 -- Drop any upgrade test data
 DROP SCHEMA IF EXISTS postgis_upgrade_test_data CASCADE;
 
--- Drop functions deprecated on upgrade
-DO LANGUAGE 'plpgsql' $DROPALL$
-DECLARE
-	rec pg_catalog.pg_proc;
-BEGIN
-	FOR rec IN
-		SELECT * FROM pg_catalog.pg_proc
-		WHERE proname ~ '_deprecated_by_postgis'
-	LOOP
-		RAISE NOTICE 'Dropping function %', rec.oid::regprocedure;
-		EXECUTE pg_catalog.format('DROP FUNCTION %s', rec.oid::regprocedure);
-	END LOOP;
-END;
-$DROPALL$;
+-- Drop deprecated functions
+\i :regdir/hooks/drop-deprecated-functions.sql

commit 86a56deffabe9ecc6088e78fb5350f76118fe9cc
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Dec 14 15:18:33 2023 +0100

    Make :regdir available to hooks

diff --git a/regress/run_test.pl b/regress/run_test.pl
index bc4daf5e7..7c297ba6d 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -1581,6 +1581,7 @@ sub load_sql_file
 		my $cmd = "psql $psql_opts -c 'CREATE SCHEMA IF NOT EXISTS $OPT_SCHEMA' ";
 		$cmd .= "-c 'SET search_path TO $OPT_SCHEMA,topology'";
 		$cmd .= " -v \"opt_dumprestore=${OPT_DUMPRESTORE}\"";
+		$cmd .= " -v \"regdir=$REGDIR\"";
 		$cmd .= " -Xf $file $DB >> $REGRESS_LOG 2>&1";
 		#print "  $file\n" if $VERBOSE;
 		my $rv = system($cmd);

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

Summary of changes:
 .../regress/hooks/hook-after-upgrade-raster.sql    |  5 +++--
 .../regress/hooks/hook-before-upgrade-raster.sql   | 13 +++++++++++++
 regress/hooks/drop-deprecated-functions.sql        | 22 ++++++++++++++++++++++
 regress/hooks/hook-after-upgrade.sql               | 16 ++--------------
 regress/run_test.pl                                |  1 +
 5 files changed, 41 insertions(+), 16 deletions(-)
 create mode 100644 regress/hooks/drop-deprecated-functions.sql


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list