Redshift Research Project

System Table Tracker

System view pg_catalog.svv_redshift_databases version 1.0.67699 / 2024-05-26

schema name column data type
pg_catalog svv_redshift_databases database_acl varchar(128)
pg_catalog svv_redshift_databases database_isolation_level 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,
              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('~' AS text)) AS varchar(128)) AS database_acl,
       CAST(pged.dboptions AS varchar(128)) AS database_options,
              WHEN CAST('concurrency_model=1' AS text) = ANY(pgd.datconfig)
                THEN CAST('Snapshot Isolation' AS text)
              WHEN CAST('concurrency_model=2' AS text) = ANY(pgd.datconfig)
                THEN CAST('Serializable' AS text)
              ELSE (SELECT CASE
                             WHEN pg_get_cluster_isolation_level.pg_get_cluster_isolation_level = 1
                               THEN CAST('Snapshot Isolation' AS text)
                             WHEN pg_get_cluster_isolation_level.pg_get_cluster_isolation_level = 2
                               THEN CAST('Serializable' AS text)
                             ELSE CAST('UNKNOWN' AS text)
                           END AS "case"
                    FROM pg_get_cluster_isolation_level())
            END AS varchar(128)) AS database_isolation_level
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 pgd.datname <> CAST('sys:internal' 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