Redshift Observatory

System Table Tracker

System view pg_catalog.svv_redshift_schema_quota version 1.0.69451 / 2024-06-27

schema name column data type
pg_catalog svv_redshift_schema_quota database_name char(128)
pg_catalog svv_redshift_schema_quota disk_usage int4
pg_catalog svv_redshift_schema_quota quota int4
pg_catalog svv_redshift_schema_quota schema_name char(128)
pg_catalog svv_redshift_schema_quota schema_owner int4

View Text

SELECT stv.database_name,
       stv.schema_name,
       stv.schema_owner,
       CASE
         WHEN stv.quota = -1
           THEN CAST(NULL AS integer)
         ELSE stv.quota
       END AS quota,
       CASE
         WHEN stv.disk_usage = -1
           THEN CAST(NULL AS integer)
         ELSE stv.disk_usage
       END AS disk_usage
FROM stv_redshift_schema_quota AS stv
WHERE stv.schema_name <> CAST('catalog_history' AS bpchar)
  AND stv.schema_name <> CAST('pg_toast' AS bpchar)
  AND stv.schema_name <> CAST('pg_internal' AS bpchar)
  AND stv.schema_name !~~ CAST('pg_temp%' AS text)
  AND CAST(stv.database_name AS name) = current_database()

UNION ALL

SELECT CAST(btrim(CAST(rs_schemas.database_name AS text)) AS varchar(128)) AS database_name,
       CAST(btrim(CAST(rs_schemas.schema_name AS text)) AS varchar(128)) AS schema_name,
       rs_schemas.schema_owner,
       CASE
         WHEN stv_quota.quota = -1
           THEN CAST(NULL AS integer)
         ELSE stv_quota.quota
       END AS quota,
       CASE
         WHEN stv_quota.disk_usage = -1
           THEN CAST(NULL AS integer)
         ELSE stv_quota.disk_usage
       END AS disk_usage
FROM pg_get_shared_redshift_schemas() AS rs_schemas(database_name varchar(128),
                                                    schema_name varchar(128),
                                                    schema_owner integer,
                                                    schema_type varchar,
                                                    schema_acl varchar,
                                                    schema_option varchar,
                                                    schema_id integer)
     LEFT JOIN stv_redshift_schema_quota AS stv_quota ON rs_schemas.schema_id = stv_quota.schema_id


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