[SCM] PostGIS branch stable-3.2 updated. 3.2.10-121-g4e8fa6611
git at osgeo.org
git at osgeo.org
Sat Aug 15 11:48:21 PDT 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.2 has been updated
via 4e8fa661191b71d814951d15ca13f6ab6dfa5cc0 (commit)
via 330d15596aee715401a0e49edca8879089d617dd (commit)
from d3b9cc6700e576a0a66a91821892bd0250548f85 (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 4e8fa661191b71d814951d15ca13f6ab6dfa5cc0
Merge: d3b9cc670 330d15596
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Sat Aug 15 11:48:20 2026 -0700
Merge pull request '[3.2] Fix postgis_tiger_geocoder CREATE EXTENSION CASCADE failing on PostgreSQL < 16' (!746) from Komzpa/postgis:fix/tiger-extschema-3.2-20260815 into stable-3.2
The previous fix wrapped every install file in a `DO $shim$ ... EXECUTE replace(...)` block to neutralize the PostgreSQL 16-only `@extschema:postgis@`/`@extschema:fuzzystrmatch@` tokens at runtime. This revision replaces that with a build-time fix: stable-3.6 already carries a working mechanism for exactly this problem (commit `bc0854651`, Aug 2024) that this branch's schema-qualification backport never received. The generated `postgis_tiger_geocoder--<version>.sql` is now produced two ways depending on `POSTGIS_PGSQL_VERSION`: copied verbatim on PostgreSQL 16+ (core substitutes the tokens, hardening intact), or stripped of the `@extschema:<name>@.` prefixes at generation time on PostgreSQL < 16 (falling back to the plain, unqualified calls that resolve via `SetSearchPathForInstall`, exactly as before the qualification was introduced). No SQL source changed.
References https://gitea.osgeo.org/postgis/postgis/pulls/713
Validated: the generated `postgis_tiger_geocoder--<version>.sql` carries zero `@extschema:` tokens on a PostgreSQL < 16 build and `CREATE EXTENSION postgis_tiger_geocoder CASCADE` succeeds; on PostgreSQL 16+ the tokens are retained and substituted by core, and CASCADE also succeeds. `test-normalize_address` and `test-upgrade` pass. No file under `extras/tiger_geocoder` is modified.
Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/746
commit 330d15596aee715401a0e49edca8879089d617dd
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Sat Aug 15 22:42:37 2026 +0400
tiger_geocoder: strip @extschema qualification for PostgreSQL < 16 at build time
The schema-qualification hardening backported into this branch's
extras/tiger_geocoder tree writes @extschema:postgis@ and
@extschema:fuzzystrmatch@ tokens, a PostgreSQL 16-only extension-script
substitution macro. The backport carried the SQL-side qualification but
not the Makefile-side mechanism that makes those tokens safe on older
servers, so CREATE EXTENSION postgis_tiger_geocoder CASCADE fails with
a syntax error on every PostgreSQL version below 16, since the token is
left unsubstituted and its literal "@" reaches the parser.
This ports the EXTSCHEMA_SUPPORTED gate, keyed on POSTGIS_PGSQL_VERSION,
that stable-3.6 has shipped since commit bc0854651 (August 2024): when
the extension is built against PostgreSQL 16 or newer the generated
install script is copied verbatim and PostgreSQL substitutes the tokens
itself; when built against an older server the tokens are stripped from
the generated script at build time, leaving the plain unqualified calls
that resolve through the extension's SetSearchPathForInstall mechanism,
exactly as they did before the qualification was introduced. No SQL
source under extras/tiger_geocoder is touched; the qualification and its
search-path-hijacking protection are retained in full on PostgreSQL 16+.
References https://gitea.osgeo.org/postgis/postgis/pulls/713
diff --git a/NEWS b/NEWS
index 2a0e0ec90..3f70cef3e 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,11 @@ PostGIS 3.2.11
- [tiger_geocoder] Qualify PostGIS and fuzzystrmatch calls, generated table
DDL, PAGC tables, loader scripts, topology loader, and dynamic SQL
against unsafe search paths (Regina Obe, Paul Ramsey)
+ - GT-713, [tiger_geocoder] Strip the PostgreSQL 16-only @extschema:<name>@
+ qualification from the generated install script on PostgreSQL < 16,
+ fixing CREATE EXTENSION postgis_tiger_geocoder CASCADE failing with a
+ syntax error while keeping the qualification on PostgreSQL 16 and above
+ (Darafei Praliaskouski)
- #6044, Skip doc XML validation without DocBook XSL stylesheets (Regina Obe)
- GH-894, [raster] Fix Float16 import, mixed nodata warping,
band replacement cleanup, GDAL credential redaction, and Python
diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in
index eb04eb576..6335ce035 100644
--- a/extensions/postgis_tiger_geocoder/Makefile.in
+++ b/extensions/postgis_tiger_geocoder/Makefile.in
@@ -1,5 +1,6 @@
include ../upgradeable_versions.mk
+POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
EXTENSION = postgis_tiger_geocoder
EXTVERSION = @POSTGIS_LIB_VERSION@
MINORVERSION = 2011. at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
@@ -30,6 +31,12 @@ DATA_built = \
REGRESS = test-normalize_address test-upgrade
REGRESS_OPTS = --load-extension=fuzzystrmatch --load-extension=postgis --load-extension=$(EXTENSION)
+EXTSCHEMA_SUPPORTED = yes
+
+## PostgreSQL < 16 doesn't understand new @extschema:extname@ syntax, so strip it
+ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" "<" 160),1)
+EXTSCHEMA_SUPPORTED = no
+endif
SQL_BITS = $(wildcard sql_bits/*.sql)
EXTRA_CLEAN = sql ${SQL_BITS}
@@ -49,8 +56,15 @@ expected:
sql:
mkdir -p $@
+ifeq ($(EXTSCHEMA_SUPPORTED),yes)
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql
cp $< $@
+else
+# PG < 16 doesn't support new @extschema:<extension_name>@
+# so we need to strip those out
+sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql
+ $(PERL) -lpe "s/\@extschema:[^@]+\@\./ /g" < $< > $@
+endif
expected/test-normalize_address.out: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/normalize_address_regress | expected
cat $^ > $@
@@ -210,9 +224,15 @@ sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: sql_bits/tiger_geocoder--unpack
#aggregates are special
#they can be dropped but we need to remove
#them from the extension first
+ifeq ($(EXTSCHEMA_SUPPORTED),yes)
sql/tiger_geocoder_upgrade_minor.sql: sql_bits/tiger_geocoder_minor.sql.in | sql
sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
$< > $@
+else
+sql/tiger_geocoder_upgrade_minor.sql: sql_bits/tiger_geocoder_minor.sql.in | sql
+ sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' -e 's/@extschema:[^@]*@\.//g' \
+ $< > $@
+endif
EXTDIR=$(DESTDIR)$(datadir)/$(datamoduledir)
-----------------------------------------------------------------------
Summary of changes:
NEWS | 5 +++++
extensions/postgis_tiger_geocoder/Makefile.in | 20 ++++++++++++++++++++
2 files changed, 25 insertions(+)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list