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

前端 未结 5 1836
情话喂你
情话喂你 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:17

    Try to add

    GRANT USAGE ON SCHEMA public to readonly;
    

    You probably were not aware that one needs to have the requisite permissions to a schema, in order to use objects in the schema.

提交回复
热议问题