SVV_USER_INFO
You can retrieve data about Amazon Redshift database users with the SVV_USER_INFO view.
SVV_USER_INFO is visible to all users. Superusers can see all rows; regular users can see only their own data. For more information, see Visibility of data in system tables and views.
Table columns
Column name | Data type | Description |
---|---|---|
user_name | text | The user name for the role. |
user_id | integer | The user ID for the user. |
createdb | boolean | A value that indicates whether the user has permissions to create databases. |
superuser | boolean | A value that indicates whether the user is a superuser. |
catalog_update | boolean | A value that indicates whether the user can update system catalogs. |
connection_limit | text | The number of connections that the user can open. |
syslog_access | text | A value that indicates whether the user has access
to the system logs. The two possible values are
RESTRICTED and UNRESTRICTED .
RESTRICTED means that users that are not superusers
can see their own records. UNRESTRICTED means that user
that are not superusers can see all records in the system views and
tables to which they have SELECT privileges. |
last_ddl_timestamp | timestamp | The timestamp for the last data definition language (DDL) create statement run by the user. |
session_timeout | integer | The maximum time in seconds that a session remains inactive or idle before timing out. 0 indicates that no timeout is set. For information about the cluster's idle or inactive timeout setting, see Quotas and limits in Amazon Redshift in the Amazon Redshift Management Guide. |
external_user_id | text | Unique identifier of the user in the third-party identity provider. |
Sample queries
The following command retrieves user information from SVV_USER_INFO.
SELECT * FROM SVV_USER_INFO;