[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-189-g5599ab151

git at osgeo.org git at osgeo.org
Mon Sep 4 00:37: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  5599ab1518b1d406fa82e74d769f0c4916b53aeb (commit)
       via  950b535067df26cc4f9f0ae063f3d317900e5072 (commit)
      from  9bc023904ddbcbe0209879db41c03f0e9c3ba70c (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 5599ab1518b1d406fa82e74d769f0c4916b53aeb
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Sep 1 23:13:43 2023 +0200

    Fix topology locked upgrade

diff --git a/topology/Makefile.in b/topology/Makefile.in
index fcaabf656..23080ba31 100644
--- a/topology/Makefile.in
+++ b/topology/Makefile.in
@@ -118,7 +118,7 @@ topology_upgrade.sql.in:  topology.sql ../utils/create_upgrade.pl
 	$(PERL) @top_srcdir@/utils/create_upgrade.pl $< > $@
 	#$(PERL) -0777 -ne 's/^(CREATE|ALTER) (CAST|OPERATOR|TYPE|TABLE|SCHEMA|DOMAIN|TRIGGER).*?;//msg;print;' $< > $@
 
-topology_upgrade.sql: topology_before_upgrade.sql topology_upgrade.sql.in topology_after_upgrade.sql
+topology_upgrade.sql: ../postgis/common_before_upgrade.sql topology_before_upgrade.sql topology_upgrade.sql.in topology_after_upgrade.sql ../postgis/common_after_upgrade.sql
 	echo "BEGIN;" > $@
 	cat $^ > $@
 	echo "COMMIT;" >> $@
diff --git a/topology/topology.sql.in b/topology/topology.sql.in
index ef89fdaeb..b1d5969dd 100644
--- a/topology/topology.sql.in
+++ b/topology/topology.sql.in
@@ -659,7 +659,6 @@ LANGUAGE 'plpgsql' VOLATILE;
 -- hierarchical or primitive, but always assumes primitive.
 --
 -- }{
-DROP FUNCTION IF EXISTS topology.populate_topology_layer();
 CREATE OR REPLACE FUNCTION topology.populate_topology_layer()
 	RETURNS TABLE(schema_name text, table_name text, feature_column text)
 AS
diff --git a/topology/topology_before_upgrade.sql.in b/topology/topology_before_upgrade.sql.in
index 03e93c6fe..aa0c7252f 100644
--- a/topology/topology_before_upgrade.sql.in
+++ b/topology/topology_before_upgrade.sql.in
@@ -7,24 +7,40 @@
 --
 --
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 -- These are functions where the argument names may have changed  --
 -- so have to be dropped before upgrade can happen for 9.0+ --
 -- argument names changed --
 -- we might want to take toTopoGeom one out before release since
 -- I don't think too many people installed the bad name
-DROP FUNCTION IF EXISTS topology.toTopoGeom(Geometry, varchar, int, float8);
+SELECT NULL FROM _postgis_drop_function_by_signature('
+topology.toTopoGeom(Geometry, varchar, int, float8)
+');
 
 -- used to be in public, will now be moved to topology
-DROP FUNCTION IF EXISTS postgis_topology_scripts_installed();
+SELECT NULL FROM _postgis_drop_function_by_signature('
+public.postgis_topology_scripts_installed()
+');
 
 -- Removed in 2.2.0 when topology API moved to liblwgeom
-DROP FUNCTION IF EXISTS topology._ST_RemEdgeCheck(varchar, integer, integer, integer, integer);
-DROP FUNCTION IF EXISTS topology._ST_AddFaceSplit(varchar, integer, integer, boolean);
+SELECT NULL FROM _postgis_drop_function_by_signature('
+topology._ST_RemEdgeCheck(varchar, integer, integer, integer, integer)
+', '2.2.0');
+-- Removed in 2.2.0 when topology API moved to liblwgeom
+SELECT NULL FROM _postgis_drop_function_by_signature('
+topology._ST_AddFaceSplit(varchar, integer, integer, boolean)
+', '2.2.0');
 
 -- Added optional bbox parameter in 3.2.0
-DROP FUNCTION IF EXISTS topology.validatetopology(varchar);
+SELECT NULL FROM _postgis_drop_function_by_signature('
+topology.validatetopology(varchar)
+', '3.2.0');
 
 -- Merged the two function into one with both allowEdgeSplitting and setContainingFace parameters
 -- being optional (3.2.0)
-DROP FUNCTION IF EXISTS topology.AddNode(varchar, geometry);
-DROP FUNCTION IF EXISTS topology.AddNode(varchar, geometry, boolean, boolean);
+SELECT NULL FROM _postgis_drop_function_by_signature('
+topology.AddNode(varchar, geometry)
+', '3.2.0');
+SELECT NULL FROM _postgis_drop_function_by_signature('
+topology.AddNode(varchar, geometry, boolean, boolean)
+', '3.2.0');

commit 950b535067df26cc4f9f0ae063f3d317900e5072
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Sep 1 22:10:27 2023 +0200

    Lock all non-catalog functions for locked upgrade, not just st_ prefixed

diff --git a/regress/hooks/use-all-functions.sql b/regress/hooks/use-all-functions.sql
index 9100e2e2a..475a09e23 100644
--- a/regress/hooks/use-all-functions.sql
+++ b/regress/hooks/use-all-functions.sql
@@ -26,10 +26,8 @@ BEGIN
 			) f
 		FROM pg_catalog.pg_proc
 		WHERE
-		-- We use the ST_ prefix as a sign that this function
-		-- belongs to PostGIS and is meant for public usage,
-		-- but the condition could be improved
-		proname like 'st\_%'
+		pronamespace::regnamespace::text !~ '^pg_'
+		AND pronamespace::regnamespace::text <> 'information_schema'
 		-- We only consider normal and window functions
 		-- ( not aggregates or procedures )
 		AND prokind in ('f','w')
@@ -42,6 +40,8 @@ BEGIN
 		AND proname NOT IN ( 'st_asmvt', 'st_fromflatgeobuf' )
 		-- Skip functions using VARIADIC or OUTPUT arguments
 		AND ( NOT coalesce(proargmodes, '{}') && ARRAY['v'::"char",'o'] )
+		-- Skip function having arguments of internal types
+		AND ( NOT proargtypes::oid[] && ARRAY ['internal'::regtype::oid] )
 	LOOP
 		EXECUTE format(
 			'CREATE VIEW postgis_upgrade_test_data.locking_view AS SELECT %s',

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

Summary of changes:
 regress/hooks/use-all-functions.sql     |  8 ++++----
 topology/Makefile.in                    |  2 +-
 topology/topology.sql.in                |  1 -
 topology/topology_before_upgrade.sql.in | 30 +++++++++++++++++++++++-------
 4 files changed, 28 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list