Skip to content

Instantly share code, notes, and snippets.

@inawrath
Created September 11, 2023 12:40
Show Gist options
  • Save inawrath/563aebc71bea0389b89550ed998bf169 to your computer and use it in GitHub Desktop.
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
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