Redshift Observatory

System Table Tracker

System view pg_catalog.svv_user_info version 1.0.72503 / 2024-08-11

schema name column data type
pg_catalog svv_user_info catalog_update bool
pg_catalog svv_user_info connection_limit varchar(256)
pg_catalog svv_user_info createdb bool
pg_catalog svv_user_info external_user_id varchar(128)
pg_catalog svv_user_info last_ddl_timestamp timestamp
pg_catalog svv_user_info session_timeout int4
pg_catalog svv_user_info superuser bool
pg_catalog svv_user_info syslog_access varchar(256)
pg_catalog svv_user_info user_id int4
pg_catalog svv_user_info user_name varchar(128)

View Text

SELECT CAST(pg_shadow.usename AS varchar) AS user_name,
       pg_shadow.usesysid AS user_id,
       pg_shadow.usecreatedb AS createdb,
       pg_shadow.usesuper AS superuser,
       pg_shadow.usecatupd AS catalog_update,
       CAST(CASE
              WHEN pse_col1.value = CAST(-1 AS text)
                THEN CAST('UNLIMITED' AS text)
              ELSE pse_col1.value
            END AS varchar) AS connection_limit,
       CAST(CASE
              WHEN pse_col2.value = CAST(-1 AS text)
                OR pg_shadow.usesuper = TRUE
                THEN CAST('UNRESTRICTED' AS text)
              ELSE CAST('RESTRICTED' AS text)
            END AS varchar) AS syslog_access,
       COALESCE(CAST(pse_col3.value AS integer),
                0) AS session_timeout,
       stl_userlog.recordtime AS last_ddl_timestamp,
       CAST(pg_identity.externalid AS varchar(128)) AS external_user_id
FROM pg_shadow
     LEFT JOIN pg_shadow_extended AS pse_col1 ON pg_shadow.usesysid = pse_col1.sysid
                                             AND pse_col1.colnum = 1
     LEFT JOIN pg_shadow_extended AS pse_col2 ON pg_shadow.usesysid = pse_col2.sysid
                                             AND pse_col2.colnum = 2
     LEFT JOIN pg_shadow_extended AS pse_col3 ON pg_shadow.usesysid = pse_col3.sysid
                                             AND pse_col3.colnum = 3
     LEFT JOIN (SELECT stl_userlog.userid,
                       max(stl_userlog.recordtime) AS recordtime
                FROM stl_userlog
                GROUP BY stl_userlog.userid) AS stl_userlog ON stl_userlog.userid = pg_shadow.usesysid
     LEFT JOIN pg_identity ON pg_shadow.usesysid = pg_identity.useid
WHERE pg_shadow.usesysid > 1


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