Reputation: 105
I am having trouble getting my head around setting up users in PostgreSQL (with PostGIS extension) - well in all honesty I've been banging my head against a wall on this for the past week. I am currently working with a dataset which most users should only have read permissions and a small group should be able to edit/delete/insert.
I am following this article:- http://osqa.sjsoft.com/questions/155/how-do-i-create-a-read-only-postgresql-account, and have followed a couple of other examples (basically the same content) found on the web
but each time I try to load my data in to QGIS I am getting messages like:-
Message1
Erroneous query: SELECT * FROM <schema>.<table> LIMIT 1 returns 7 [error: permissions denied for schema <schema>. Line 1: SELECT * FROM <schema>.<table> LIMIT 1
]
Message2
Unable to access the <schema>.<table> relation.
The error message fromt he database was:
ERROR: permission denied for schema <schema>
Line 1: Select * from <schema>.<Tbale> LIMIT 1
SQL: SELECT * from <schema>.<table> LIMIT 1
I am using PGADMIN III on a PostGreSQL 9.2 database. I'm pretty sure I have either missed a step or done something during Proof of Concept which is hindering me being able to set up accounts (would something like having trust set up for all access methods play a part in the issue I am getting?).
Upvotes: 0
Views: 858
Reputation: 324275
It looks like you created the user successfully, but forgot to GRANT
them rights to the schema and/or the tables within it.
If the user didn't exist, you wouldn't be able to log in at all.
Upvotes: 1