Created
February 2, 2021 14:07
-
-
Save 2color/bf649744b5923eebaf687f3eb1ac586c to your computer and use it in GitHub Desktop.
PostgreSQL grant user permissions to a database
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
REVOKE ALL ON DATABASE example_database FROM example_user; | |
GRANT CONNECT ON DATABASE example_database TO example_user; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO example_user; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO example_user; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment