Skip to content

Instantly share code, notes, and snippets.

@martinusso
Last active February 24, 2020 03:17
Show Gist options
  • Save martinusso/dc6d4eb8143f563066411c7cd3a4195a to your computer and use it in GitHub Desktop.
Save martinusso/dc6d4eb8143f563066411c7cd3a4195a to your computer and use it in GitHub Desktop.
grant postgres
GRANT CONNECT ON DATABASE postgres TO role_name;
GRANT CREATE ON DATABASE postgres TO role_name;
GRANT USAGE ON SCHEMA schema_name TO role_name;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA schema_name TO role_name;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA schema_name TO role_name;
ALTER DEFAULT PRIVILEGES IN SCHEMA schema_name GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO role_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment