Difference between revisions of "Amazon Redshift: grant read only privileges to user"

From wikieduonline
Jump to navigation Jump to search
Line 31: Line 31:
 
* <code>[[psql]]</code>
 
* <code>[[psql]]</code>
 
* https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT-examples.html
 
* https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT-examples.html
 +
* <code>[[GRANT USAGE ON DATASHARE]]</code>
  
 
== See also ==
 
== See also ==

Revision as of 08:28, 12 May 2022

For users

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

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

See also

Advertising: