Last active
July 7, 2022 06:59
-
-
Save jittuu/c7c72875e3e14dc0c7658b6de14929f6 to your computer and use it in GitHub Desktop.
Create APP CRUD user in Postgres
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 ROLE crud_user LOGIN PASSWORD 'thisissecretpassword'; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public | |
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO crud_user; | |
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO crud_user; | |
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO crud_user; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public | |
GRANT USAGE, SELECT ON SEQUENCES TO crud_user; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment