Wednesday, November 9, 2011

Postgresql - GRANT SELECT ON ALL TABLES IN SCHEMA myschema TO myuser;

Very nice shortcut to creating a read only user, without specifying table by table manually.

http://developer.postgresql.org/pgdocs/postgres/sql-grant.html

Don't forget to grant him connect to the database and usage on the schema too.

http://stackoverflow.com/questions/760210/how-do-you-create-a-read-only-user-in-postgresql
GRANT CONNECT ON DATABASE musicbrainz_db TO curso_sql;

GRANT USAGE ON SCHEMA musicbrainz TO curso_sql;

No comments:

Post a Comment