Created
April 24, 2012 20:57
-
-
Save fabriciocolombo/2483652 to your computer and use it in GitHub Desktop.
PostgreSQL read-only user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRANT CONNECT ON DATABASE $dbName TO $user; | |
GRANT USAGE ON SCHEMA $schema TO $user; | |
GRANT SELECT ON ALL TABLES IN SCHEMA $schema TO $user; | |
Default privileges | |
ALTER DEFAULT PRIVILEGES IN SCHEMA $schema | |
GRANT SELECT ON TABLES TO $user; | |
see more at http://www.postgresql.org/docs/9.0/static/sql-alterdefaultprivileges.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment