Amazon Redshift: grant read only privileges to user

From wikieduonline
Jump to navigation Jump to search

For users[edit]

0) List schemas and priviles:

\dn+

1) Grant permissions to schema:

GRANT USAGE ON SCHEMA your_schema TO your_user;
Output: GRANT

2) Grant permissions on tables in the schema:

GRANT SELECT ON ALL TABLES IN SCHEMA your_schema TO your_user;
Output: GRANT

3) Verify changes:

\dn+

For groups[edit]

0) List schemas and priviles:

\dn+

1) Grant permissions to schema:

GRANT USAGE ON SCHEMA your_schema TO GROUP your_group;
Output: GRANT

2) Grant permissions on tables in the schema:

GRANT SELECT ON ALL TABLES IN SCHEMA your_schema TO GROUP your_group;
Output: GRANT

3) Verify changes:

\dn+

Related[edit]

See also[edit]

Advertising: