-
Notifications
You must be signed in to change notification settings - Fork 1
Postgres Permissions
Steven Hall edited this page Mar 2, 2018
·
2 revisions
Create the user:
createuser usernamehere
Remainder is in the psql
shell.
Set password:
\password USERNAME
Grant connect permission (source):
revoke connect on database DBNAME from public;
grant all privileges on database DBNAME to USERNAME;
Grant table permissions:
\c DBNAME
grant all privileges on all tables in schema public to USERNAME;
Set default table permissions:
alter default privileges in schema public grant all privileges on tables to USERNAME;