[GIS] Problem loading PostGIS (Postgres) View layer in QGIS

postgispostgresqlqgis

Why is Postgres user XX via command „Add PostGIS Layers“ in QGIS enabled upload only View tables which owns?
Or how to achieve it to the user XX via PostGIS can load View table which owns the user YY?

Main table from the database with different users are assigned by rolls, however the View tables we could not find that there is a possibility of assigning rolls.

Any idea how solve this problem?

Best Answer


user XX must give privilege to user YY on that view table
in PgAdmin SQL editor user XX should write:

GRANT SELECT ON TABLE "view table" TO "ROLE XYZ"


and of course user YY must be member of ROLE XYZ

Related Question