user9484383
user9484383

Reputation:

How to grant permission to system tables and view in redshift

I want to grant permission to particular user for system tables,system logging and system view.

Upvotes: 3

Views: 7255

Answers (2)

deesolie
deesolie

Reputation: 1062

What @Elle said is correct, but there are some system tables that require you to run additional queries to give a non-super user visibility to rows in certain tables (such as STL_QUERY and STL_QUERY_TEXT). See Visibility of data in system tables and views for details.

Run ALTER USER <your_user> WITH SYSLOG ACCESS UNRESTRICTED; then run GRANT SELECT on pg_catalog.<table_name> to <your_user>;

NOTE Giving a user unrestricted access to system tables gives that user visibility to data which might contain sensitive user-generated data.

Upvotes: 1

Elle
Elle

Reputation: 157

I've read in this answer that granting syslog access would help, but that did not work for me on view svv_table_info. what did work for me was simple grant select, but only when I've added the system schema name too.

grant select on pg_catalog.svv_table_info to user;

Upvotes: 4

Related Questions