Created
July 10, 2015 03:15
-
-
Save isccarrasco/0f3f41e4b0972dedd848 to your computer and use it in GitHub Desktop.
Script for create a read-only user on PostgreSQL.
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
CREATE ROLE queryUser WITH NOCREATEDB NOCREATEROLE NOCREATEUSER NOINHERIT NOREPLICATION ENCRYPTED PASSWORD '****' CONNECTION LIMIT 1 LOGIN; | |
GRANT USAGE ON SCHEMA public TO queryUser; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO queryUser; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GRANT all privileges on SCHEMA recaudacion to produccion;