Redshift Observatory

System Table Tracker

System view pg_catalog.svv_redshift_databases version 1.0.51304 / 2023-06-04

schema name column data type
pg_catalog svv_redshift_databases database_acl varchar(128)
pg_catalog svv_redshift_databases database_name varchar(128)
pg_catalog svv_redshift_databases database_options varchar(128)
pg_catalog svv_redshift_databases database_owner int4
pg_catalog svv_redshift_databases database_type varchar(32)

View Text

SELECT CAST(btrim(CAST(pgd.datname AS text)) AS varchar(128)) AS database_name,
       pgd.datdba AS database_owner,
       CAST(CASE
              WHEN pged.dbkind = 1
                THEN CAST('shared' AS text)
              WHEN pged.dbkind = 2
                THEN CAST('shared via data catalog' AS text)
              WHEN pged.dbkind = 3
                THEN CAST('auto mounted catalog' AS text)
              ELSE CAST('local' AS text)
            END AS varchar(32)) AS database_type,
       CAST(array_to_string(pgd.datacl,
                            CAST('~' AS text)) AS varchar(128)) AS database_acl,
       CAST(pged.dboptions AS varchar(128)) AS database_options
FROM pg_database AS pgd
     LEFT JOIN pg_external_database AS pged ON pgd.oid = pged.dbid
WHERE pgd.datname <> CAST('padb_harvest' AS name)
  AND pgd.datname <> CAST('template0' AS name)
  AND pgd.datname <> CAST('template1' AS name)
  AND pgd.datname <> CAST('awsdatacatalog' AS name)
  AND (pged.dboptions IS NULL
    OR has_shared_database_privilege(pgd.oid,
                                     CAST('usage' AS text)))


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