Created
March 30, 2023 09:24
-
-
Save echoes341/d03ff8fdb0fcdc13c7fe893ff3460ba0 to your computer and use it in GitHub Desktop.
PostgreSQL: create new user and give full access to all tables and all new future tables
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
-- https://phoenixnap.com/kb/postgres-create-user | |
-- from the user that will create new tables | |
CREATE USER userb WITH PASSWORD 'sosecure'; | |
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "userb"; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO "userb"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment