qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.38k stars 2.98k forks source link

qgis can't search for postgis elsewhere than in the public schema #58577

Open thomas-szczurek opened 2 weeks ago

thomas-szczurek commented 2 weeks ago

What is the bug or the crash?

It seems that qgis automatically searches after postgis in postgresql's public schema rather than in its search_path parameter. If postgis is installed in another schema (something you may want to do as postgresql policy is try to not use the public schema anymore), qgis can no longer understand table geometries, can't find any functions ...

Steps to reproduce the issue

CREATE EXTENSION postgis SCHEMA extensions;

ALTER DATABASE testdb SET search_path = public,extensions;

Versions

3.38

Supported QGIS version

New profile

Additional context

No response

elpaso commented 4 hours ago

I cannot reproduce locally, I followed your instructions but QGIS is able to create and to see all spatial tables in both extensions and public schema.

immagine

immagine