Created
February 3, 2025 07:36
-
-
Save pen-pal/fc7936a9a5c4bdea94f248171e1978f4 to your computer and use it in GitHub Desktop.
postgresql-user-and-db-create.sh
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 DATABASE test; | |
| CREATE USER test WITH PASSWORD 'test'; | |
| GRANT ALL PRIVILEGES ON DATABASE test TO test; | |
| \c test | |
| GRANT ALL PRIVILEGES ON SCHEMA public TO test; | |
| GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO test; | |
| GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO test; | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO test; | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO test; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment