Postgres Reader Role
Created on April 16, 2026
postgres
Here is how to create a reader with just select permissions.
begin;
create role analyst with nologin;
create role david with login password 'pa55word' inherit;
grant analyst to david;
commit;
begin;
grant usage
on schema "public"
to analyst;
grant select
on all tables in schema "public"
to analyst;
alter default privileges in schema public
grant select on tables to analyst;
grant usage, select on all sequences in schema public
to analyst;
commit;