Listing PostGIS layers from an EnterpriseDb fails #19694
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Data Provider
Related to specific vector, raster or mesh data providers
Author Name: Wouter Boasson (Wouter Boasson)
Original Redmine Issue: 11417
Affected QGIS version: 2.4.0
Redmine category:data_provider/postgis
Listing postgis layers from an EnterpriseDb postgres database fails. Connecting to the database is no problem, but when clicking 'Connect' the layer list remains empty. The query used to retrieve information on the available layers also lists non existing schema's, which makes the
has_schema_privilege(n.nspname,'usage')
function call fails on non-existing schema's, leading to errors like these:2014-10-15 08:44:38 CEST ERROR schema "dbms_rls" does not exist
Cause: the EnterpriseDb catalog also contains virtual schema's for their Oracle compatibility layer, using an extended pg_namespace table. Affects all versions of QGis and EnterpriseDb Postgres.
My proposed solution is to take the ANSI Schema (information_schema) into account, as here the virtual schema's are filtered out. E.g. join or use an additional WHERE constraint. This approach should solve the problem, and is compatible with vanilla postgres databases:
The text was updated successfully, but these errors were encountered: