Last active
April 18, 2022 15:42
-
-
Save garystafford/83334a267e64b9d44902d332aa8dad53 to your computer and use it in GitHub Desktop.
This file contains 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 USER read_only_user WITH ENCRYPTED PASSWORD 'change_me!'; | |
GRANT CONNECT ON DATABASE pagila TO read_only_user; | |
GRANT USAGE ON SCHEMA films TO read_only_user; | |
GRANT SELECT ON ALL TABLES IN SCHEMA films TO read_only_user; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA films | |
GRANT SELECT ON TABLES TO read_only_user; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment