Readonly user in PostgreSQL
All tables are available from pg_stat_user_tables
.
Grant connection with grant connect on database database_name to readonly
Table-by-table privileges with psql database_name -tc "select 'grant select on '||relname||' to readonly_user;' from pg_stat_user_tables" | psql database_name
Written by Andrew King
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Postgresql
Authors
Related Tags
#postgresql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#