You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect ogr utilities (ogrinfo, ogr2ogr) to use the schema search_path set in the target database if a schema or search path is not otherwise specified.
The use case is controlling the schema search path at the database level rather than at the clients. This allows the database schemas to change (eg, in a blue/green deployment pattern) without having to change client code.
This worked fine until GDAL 3.1.0.
Steps to reproduce the problem.
These examples connect to a local instance of PostgreSQL 16 where search_path is set to "$user", vectors, sys, users, extensions.
Using GDAL verison <= 3.0.4, the correct search_path is returned (and queries to tables in those schemas are successful):
The latest supported GDAL version is 3.7 so please test with it first. You could have also mentioned these gis.stackexcange questions because their include some details and also an usage example of -oo prelude_statements.
Also, we prefer to use gdal-dev mailing list for asking questions. If the reported behavior appears to be a bug then it is the time to make a bug report.
Expected behavior and actual behavior.
I expect ogr utilities (ogrinfo, ogr2ogr) to use the schema
search_path
set in the target database if a schema or search path is not otherwise specified.The use case is controlling the schema search path at the database level rather than at the clients. This allows the database schemas to change (eg, in a blue/green deployment pattern) without having to change client code.
This worked fine until GDAL 3.1.0.
Steps to reproduce the problem.
These examples connect to a local instance of PostgreSQL 16 where
search_path
is set to"$user", vectors, sys, users, extensions
.Using GDAL verison <= 3.0.4, the correct
search_path
is returned (and queries to tables in those schemas are successful):However, when using GDAL >= 3.1.0, the
search_path
returned is alwayspublic, extensions
:Operating system
Ubuntu 20.04, 22.04
GDAL version and provenance
Docker images
The text was updated successfully, but these errors were encountered: