Redshift Observatory

System Table Tracker

System view pg_catalog.svv_roles version 1.0.56754 / 2023-09-21

schema name column data type
pg_catalog svv_roles external_id varchar(128)
pg_catalog svv_roles role_id int4
pg_catalog svv_roles role_name varchar(128)
pg_catalog svv_roles role_owner varchar(128)

View Text

SELECT pg_role.rolid AS role_id,
       CAST(pg_role.rolname AS varchar(128)) AS role_name,
       CAST(pg_identity.usename AS varchar(128)) AS role_owner,
       CAST(pg_role.externalid AS varchar(128)) AS external_id
FROM pg_role
     INNER JOIN pg_identity ON pg_identity.useid = pg_role.rolowner
WHERE pg_role.rolname !~~ CAST('/%' AS text)
  AND pg_identity.usename !~~ CAST('f346c9b8%' AS text)
  AND (EXISTS (SELECT 1
               FROM pg_identity
               WHERE pg_identity.useid = current_user_id()
                 AND pg_identity.usesuper = TRUE)
    OR has_system_privilege(CAST("current_user"() AS name),
                            CAST('ACCESS SYSTEM TABLE' AS text))
    OR user_is_member_of_role(CAST("current_user"() AS name),
                              pg_role.rolname)
    OR current_user_id() = pg_role.rolowner)


Home 3D Друк Blog Bring-Up Times Consultancy Cross-Region Benchmarks Email Forums IRC Mailing Lists Reddit Redshift Price Tracker Redshift Version Tracker Redshift Workbench System Table Tracker The Known Universe Twitter White Papers