Skip to content

fix(PostGIS): strip $libdir/ prefix from extension SQL scripts#293

Open
gbartolini wants to merge 1 commit into
mainfrom
dev/256
Open

fix(PostGIS): strip $libdir/ prefix from extension SQL scripts#293
gbartolini wants to merge 1 commit into
mainfrom
dev/256

Conversation

@gbartolini

@gbartolini gbartolini commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

ALTER EXTENSION UPDATE fails with "could not access file "$libdir/postgis-3": No such file or directory" because the PGDG-packaged postgis/address_standardizer SQL scripts hardcode $libdir/<module> both in LOAD statements and in AS function definitions, but with imageVolume-mounted extensions there is no $libdir to expand. dynamic_library_path already resolves the bare module name, so the $libdir/ prefix is stripped from all PostGIS install and upgrade scripts at build time.

If successful, we should fix this upstream, either in the Debian packaging project or in PostGIS directly.

Closes #256

Co-Authored-By: Claude

`ALTER EXTENSION UPDATE` fails with `"could not access file "$libdir/postgis-3": No such file or directory"` because the PGDG-packaged `postgis/address_standardizer` upgrade SQL hardcodes `LOAD '$libdir/<module>'`, but with `imageVolume`-mounted extensions there is no `$libdir` to expand. `dynamic_library_path` already resolves the bare module name, so the prefix is stripped from the scripts at build time.

If successful, we should fix this upstream, either in the Debian packaging project or in PostGIS directly.

Closes #256

Co-Authored-By: Claude

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
@mnencia mnencia changed the title fix(PostGIS): strip $libdir/ from LOAD statements in upgrade scripts fix(PostGIS): strip $libdir/ prefix from extension SQL scripts Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Postgis extension upgrade issue

2 participants