[SCM] PostGIS branch stable-3.4 updated. 3.4.6-139-g94f95f9c5

git at osgeo.org git at osgeo.org
Sat Aug 15 11:48:35 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.4 has been updated
       via  94f95f9c581166f82c3d0551d89ed8f05dec3f45 (commit)
       via  8b360d0fcbea28e5aac47d69383fc0e9d4809d42 (commit)
      from  d81d4736b575b2a19f8ed0251f366e326bd35724 (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 94f95f9c581166f82c3d0551d89ed8f05dec3f45
Merge: d81d4736b 8b360d0fc
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date:   Sat Aug 15 11:48:34 2026 -0700

    Merge pull request '[3.4] Fix postgis_tiger_geocoder CREATE EXTENSION CASCADE failing on PostgreSQL < 16' (!744) from Komzpa/postgis:fix/tiger-extschema-3.4-20260815 into stable-3.4
    
    Replaces the earlier `DO $shim$` text-rewrite approach with a build-time fix: stable-3.4's `extensions/postgis_tiger_geocoder/Makefile.in` now strips `@extschema:postgis@`/`@extschema:fuzzystrmatch@` tokens from the generated install SQL only when building against PostgreSQL < 16 (`POSTGIS_PGSQL_VERSION < 160`), the same `EXTSCHEMA_SUPPORTED` mechanism stable-3.6 has shipped since commit bc0854651 (Aug 2024). PostgreSQL 16+ builds keep the qualified, hardened calls untouched. No SQL source under `extras/tiger_geocoder` changes.
    
    References https://gitea.osgeo.org/postgis/postgis/pulls/711
    
    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/744


commit 8b360d0fcbea28e5aac47d69383fc0e9d4809d42
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Sat Aug 15 22:43:44 2026 +0400

    tiger_geocoder: strip @extschema qualification for PostgreSQL < 16 at build time
    
    The tiger_geocoder schema-qualification hardening backported into this
    branch's extras/tiger_geocoder tree writes @extschema:postgis@ and
    @extschema:fuzzystrmatch@ tokens, PostgreSQL's substitution macro for
    referencing a required extension's installed schema. That macro is
    resolved by PostgreSQL core starting with version 16; the backport
    carried the SQL-side qualification onto this branch without also
    carrying stable-3.6's Makefile-side mechanism that makes the same
    qualification safe on older servers, so on every PostgreSQL version
    this branch supports below 16 the token is left completely
    unsubstituted and CREATE EXTENSION postgis_tiger_geocoder CASCADE
    fails with a syntax error at the first such token.
    
    This ports stable-3.6's EXTSCHEMA_SUPPORTED mechanism, in place there
    since commit bc0854651 (Aug 2024): the generated install SQL and the
    minor-upgrade SQL are stripped of @extschema:<name>@. prefixes by a
    Makefile perl substitution gated on POSTGIS_PGSQL_VERSION < 160, so
    PostgreSQL 16 and newer keep the qualified, hardened calls exactly as
    written, and older servers install the same bare, search-path-resolved
    calls tiger_geocoder used before the hardening. No SQL source under
    extras/tiger_geocoder changes; the qualification itself is untouched
    where PostgreSQL substitutes it.
    
    References https://gitea.osgeo.org/postgis/postgis/pulls/711

diff --git a/NEWS b/NEWS
index e2eacf890..9a8191ad3 100644
--- a/NEWS
+++ b/NEWS
@@ -51,6 +51,10 @@ PostGIS 3.4.7
   - [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-711, [tiger_geocoder] Strip the PostgreSQL 16-only @extschema:<name>@
+    qualification from the generated install script at build time on older
+    servers, fixing CREATE EXTENSION postgis_tiger_geocoder CASCADE failing
+    with a syntax error on PostgreSQL < 16 (Darafei Praliaskouski)
   - #6046, Prefer GraphicsMagick for documentation image generation
            (Darafei Praliaskouski)
   - GH-890, Avoid GIDX BRIN summary merges across mismatched
diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in
index da6cb40e3..d5b537fb0 100644
--- a/extensions/postgis_tiger_geocoder/Makefile.in
+++ b/extensions/postgis_tiger_geocoder/Makefile.in
@@ -1,5 +1,6 @@
 include @srcdir@/../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 expected ${SQL_BITS}
@@ -50,8 +57,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 $^ > $@
@@ -199,9 +213,17 @@ 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/tiger_geocoder_minor.sql.in | sql
 	sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
 	 	 $< > $@
+else
+sql/tiger_geocoder_upgrade_minor.sql:  sql/tiger_geocoder_minor.sql.in | sql
+	sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
+	 	 $< > $@.tmp
+	$(PERL) -lpe "s/\@extschema:[^@]+\@\.//g" < $@.tmp > $@
+	rm -f $@.tmp
+endif
 
 #only extension files
 EXTRA_CLEAN += $(wildcard expected/*--*.out)

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

Summary of changes:
 NEWS                                          |  4 ++++
 extensions/postgis_tiger_geocoder/Makefile.in | 22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list