4

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?

Mike T
42.7k10 gold badges131 silver badges194 bronze badges
asked Apr 17, 2013 at 10:23
1

3 Answers 3

3


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

answered May 7, 2013 at 6:09
3

The QGIS table browser has a well-hidden option that you need to toggle to tell it what column to use as a unique key before it will let you display a view.

How to make a spatial view in PostGIS and add it as a layer in QGIS?

Which means, also, your view has to include a unique column to use as a key.

answered Apr 17, 2013 at 19:08
1
  • brunci has a problem that he can not see any of View tabels that the owner of the table can see (There is no problem with unique column) Commented Apr 18, 2013 at 6:42
0

for me, typecasting worked, e.g.:

CREATE VIEW myview AS SELECT id,
 ST_Buffer(geom_pt,2.6)::geometry(Polygon,25832) AS mybuffer
 FROM myoriginaltable;
Taras
35.6k5 gold badges77 silver badges151 bronze badges
answered Apr 23, 2020 at 8:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.