Redshift Research Project

System Table Tracker

System view information_schema.views version 1.0.41465 / 2022-09-10

schema name column data type
information_schema views check_option character_data
information_schema views is_insertable_into character_data
information_schema views is_updatable character_data
information_schema views table_catalog sql_identifier
information_schema views table_name sql_identifier
information_schema views table_schema sql_identifier
information_schema views view_definition character_data

View Text

SELECT CAST(current_database() AS information_schema.sql_identifier) AS table_catalog,
       CAST(nc.nspname AS information_schema.sql_identifier) AS table_schema,
       CAST(c.relname AS information_schema.sql_identifier) AS table_name,
              WHEN u.usename = CAST("current_user"() AS name)
                THEN pg_get_viewdef(c.oid)
              ELSE CAST(NULL AS text)
            END AS information_schema.character_data) AS view_definition,
       CAST(CAST('NONE' AS information_schema.character_data) AS information_schema.character_data) AS check_option,
       CAST(CAST(NULL AS information_schema.character_data) AS information_schema.character_data) AS is_updatable,
       CAST(CAST(NULL AS information_schema.character_data) AS information_schema.character_data) AS is_insertable_into
FROM pg_namespace AS nc, pg_class AS c, pg_user AS u
WHERE c.relnamespace = nc.oid
  AND u.usesysid = c.relowner
  AND c.relkind = CAST('v' AS "char")
  AND (u.usename = CAST("current_user"() AS name)
    OR has_table_privilege(c.oid,
                           CAST('SELECT' AS text))
    OR has_table_privilege(c.oid,
                           CAST('INSERT' AS text))
    OR has_table_privilege(c.oid,
                           CAST('UPDATE' AS text))
    OR has_table_privilege(c.oid,
                           CAST('DELETE' AS text))
    OR has_table_privilege(c.oid,
                           CAST('RULE' AS text))
    OR has_table_privilege(c.oid,
                           CAST('REFERENCES' AS text))
    OR has_table_privilege(c.oid,
                           CAST('TRIGGER' AS text))
    OR has_any_column_privilege(c.oid,
                                CAST('SELECT' AS text))
    OR has_any_column_privilege(c.oid,
                                CAST('UPDATE' 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