Created
April 24, 2018 21:57
-
-
Save aks/ad2b883511ab18a7abb4d6f9fc6fe2f9 to your computer and use it in GitHub Desktop.
Create read-only SQL 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
| -- create a read-only user | |
| create role procore_ro; | |
| -- allow the RO user to use the public schema | |
| grant usage on schema public to procore_ro; | |
| -- grant RO access on existing tables | |
| grant select on all tables in schema public to procore_ro; | |
| -- grant RO access on future tables | |
| alter default privileges in schema public grant select on tables to procore_ro; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment