ERROR: permission denied for relation tablename on Postgres while trying a SELECT as a readonly user

前端 未结 5 1843
情话喂你
情话喂你 2020-11-28 18:54
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;

The readonly user can connect, see the tables but when it tries to do a simple select it g

5条回答
  •  醉酒成梦
    2020-11-28 19:28

    You should execute the next query:

    GRANT ALL ON TABLE mytable TO myuser;
    

    Or if your error is in a view then maybe the table does not have permission, so you should execute the next query:

    GRANT ALL ON TABLE tbm_grupo TO myuser;
    

提交回复
热议问题