Created
September 11, 2023 12:40
-
-
Save inawrath/563aebc71bea0389b89550ed998bf169 to your computer and use it in GitHub Desktop.
Command to create a user in the PostgreSQL database and grant permissions only to a specific table
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 username with encrypted password 'password_to_user'; | |
-- Permissions | |
GRANT SELECT ON TABLE database.public.table_db TO username; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment