[SCM] PostGIS branch stable-3.3 updated. 3.3.7-75-gaff83b101
git at osgeo.org
git at osgeo.org
Sat Feb 7 19:57:56 PST 2026
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.3 has been updated
via aff83b101cb1838f39670502e972d71645c5786a (commit)
from 023e57521e8c33c6ef862f17462389b55ba46e1e (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 aff83b101cb1838f39670502e972d71645c5786a
Author: Regina Obe <lr at pcorp.us>
Date: Sat Feb 7 22:03:17 2026 -0500
Remove postgis_extension_remove_objects
References #5853 for PostGIS 3.3.9
diff --git a/NEWS b/NEWS
index 04408d87d..f57ba5eba 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,7 @@ Proj 4.9+ required.
- #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required
by extension are owned by extension
authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky)
+ - #5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson)
PostGIS 3.3.8
diff --git a/doc/release_notes.xml b/doc/release_notes.xml
index 9db92776f..292f6160c 100644
--- a/doc/release_notes.xml
+++ b/doc/release_notes.xml
@@ -35,6 +35,7 @@
<para><ulink url="https://trac.osgeo.org/postgis/ticket/5998">5998</ulink>, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required
by extension are owned by extension
authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky)</para>
+ <para><ulink url="https://trac.osgeo.org/postgis/ticket/5853">5853</ulink>, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson)</para>
</simplesect>
</sect1>
<sect1>
diff --git a/extensions/postgis_extension_helper.sql.in b/extensions/postgis_extension_helper.sql.in
index 632385133..b0f73015b 100644
--- a/extensions/postgis_extension_helper.sql.in
+++ b/extensions/postgis_extension_helper.sql.in
@@ -14,72 +14,6 @@
-- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade
-- The functions get uninstalled after the extention install/upgrade process
---------------------------
--- postgis_extension_remove_objects: This function removes objects of a particular class from an extension
--- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command
--- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extention
--- So we use this to remove it from extension first before we drop
-CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text)
- RETURNS boolean AS
-$$
-DECLARE
- var_sql text := '';
- var_r record;
- var_result boolean := false;
- var_class text := '';
- var_is_aggregate boolean := false;
- var_sql_list text := '';
- var_pgsql_version integer := pg_catalog.current_setting('server_version_num');
-BEGIN
- var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END;
- var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END;
-
- IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN
- var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname,
- cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command
- FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e
- ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON
- c.oid OPERATOR(pg_catalog.=) d.classid
- LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid
- LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid
- LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid
- WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND COALESCE(proc.proisagg, false) OPERATOR(pg_catalog.=) $4;$sql$;
- ELSE -- for PostgreSQL 11 and above, they removed proc.proisagg among others and replaced with some func type thing
- var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname,
- cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command
- FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e
- ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON
- c.oid OPERATOR(pg_catalog.=) d.classid
- LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid
- LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid
- LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid
- LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid
- WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND (proc.prokind OPERATOR(pg_catalog.=) 'a') OPERATOR(pg_catalog.=) $4;$sql$;
- END IF;
-
- FOR var_r IN EXECUTE var_sql_list USING param_extension, var_class, param_type, var_is_aggregate
- LOOP
- var_sql := var_sql OPERATOR(pg_catalog.||) var_r.remove_command OPERATOR(pg_catalog.||) ';';
- END LOOP;
- IF var_sql > '' THEN
- EXECUTE var_sql;
- var_result := true;
- END IF;
-
- RETURN var_result;
-END;
-$$
-LANGUAGE plpgsql VOLATILE;
CREATE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text)
RETURNS boolean AS
diff --git a/extensions/postgis_extension_helper_uninstall.sql b/extensions/postgis_extension_helper_uninstall.sql
index 2fb1d1756..756dc80f8 100644
--- a/extensions/postgis_extension_helper_uninstall.sql
+++ b/extensions/postgis_extension_helper_uninstall.sql
@@ -13,7 +13,6 @@
--
-- This drops extension helper functions
-- and should be called at the end of the extension upgrade file
-DROP FUNCTION postgis_extension_remove_objects(text, text);
DROP FUNCTION postgis_extension_drop_if_exists(text, text);
DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(varchar);
DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(text);
diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in
index 35ec1ee8a..1844c10d8 100644
--- a/extensions/postgis_tiger_geocoder/Makefile.in
+++ b/extensions/postgis_tiger_geocoder/Makefile.in
@@ -84,7 +84,7 @@ sql/$(EXTENSION).sql: sql/$(EXTENSION)_pre.sql ../../utils/create_or_replace_to_
| $(PERL) @top_srcdir@/utils/create_or_replace_to_create.pl sql/$(EXTENSION)_pre.sql \
> $@
-sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql | sql
+sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql | sql
cat $^ > $@
echo "SELECT postgis_extension_drop_if_exists('${EXTENSION}', 'DROP SCHEMA tiger_data');" >> $@
cat @srcdir@/../postgis_extension_helper_uninstall.sql >> $@
diff --git a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in b/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in
deleted file mode 100644
index 704a145b6..000000000
--- a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in
+++ /dev/null
@@ -1,19 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
-----
--- PostGIS - Spatial Types for PostgreSQL
--- http://postgis.net
---
--- Copyright (C) 2011 Regina Obe <lr at pcorp.us>
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
---
--- Author: Regina Obe <lr at pcorp.us>
---
--- This drops extension helper functions
--- and should be called at the end of the extension upgrade file
--- removes all postgis_topology functions from postgis_topology extension since they will be readded
--- during upgrade
-SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'FUNCTION');
-SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'AGGREGATE');
diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in
index c8eb43aba..427bb2b0f 100644
--- a/extensions/postgis_topology/Makefile.in
+++ b/extensions/postgis_topology/Makefile.in
@@ -43,7 +43,6 @@ DATA_built = \
EXTENSION_UPGRADE_SCRIPTS = \
extlock.sql \
../postgis_extension_helper.sql \
- sql_bits/remove_from_extension.sql.in \
sql/topology_upgrade.sql \
sql_bits/mark_editable_objects.sql.in \
sql/topology_comments.sql \
diff --git a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in b/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in
deleted file mode 100644
index 9d695d6a3..000000000
--- a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in
+++ /dev/null
@@ -1,19 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
-----
--- PostGIS - Spatial Types for PostgreSQL
--- http://postgis.net
---
--- Copyright (C) 2011 Regina Obe <lr at pcorp.us>
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
---
--- Author: Regina Obe <lr at pcorp.us>
---
--- This drops extension helper functions
--- and should be called at the end of the extension upgrade file
--- removes all postgis_topology functions from postgis_topology extension since they will be readded
--- during upgrade
-SELECT postgis_extension_remove_objects('postgis_topology', 'FUNCTION');
-SELECT postgis_extension_remove_objects('postgis_topology', 'AGGREGATE');
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
doc/release_notes.xml | 1 +
extensions/postgis_extension_helper.sql.in | 66 ----------------------
extensions/postgis_extension_helper_uninstall.sql | 1 -
extensions/postgis_tiger_geocoder/Makefile.in | 2 +-
.../sql_bits/remove_from_extension.sql.in | 19 -------
extensions/postgis_topology/Makefile.in | 1 -
.../sql_bits/remove_from_extension.sql.in | 19 -------
8 files changed, 3 insertions(+), 107 deletions(-)
delete mode 100644 extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in
delete mode 100644 extensions/postgis_topology/sql_bits/remove_from_extension.sql.in
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list