schema | name | column | data type |
---|---|---|---|
pg_catalog | svv_tables | remarks | varchar(256) |
pg_catalog | svv_tables | table_catalog | varchar(128) |
pg_catalog | svv_tables | table_name | varchar(128) |
pg_catalog | svv_tables | table_schema | varchar(128) |
pg_catalog | svv_tables | table_type | varchar(15) |
SELECT CAST(current_database() AS varchar(128)) AS table_catalog, CAST(nc.nspname AS varchar(128)) AS table_schema, CAST(c.relname AS varchar(128)) AS table_name, CAST(CASE WHEN nc.nspname ~~ like_escape(CAST('pg!_temp!_%' AS text), CAST('!' AS text)) THEN CAST('LOCAL TEMPORARY' AS text) WHEN c.relkind = CAST('r' AS "char") THEN CAST('BASE TABLE' AS text) WHEN c.relkind = CAST('v' AS "char") THEN CAST('VIEW' AS text) ELSE CAST(NULL AS text) END AS varchar) AS table_type, CAST(d.description AS varchar) AS remarks FROM pg_namespace AS nc INNER JOIN pg_class AS c ON c.relnamespace = nc.oid LEFT JOIN pg_description AS d ON c.oid = d.objoid AND d.objsubid = 0 WHERE c.relkind = CAST('r' AS "char") OR c.relkind = CAST('v' AS "char") UNION ALL SELECT CAST(current_database() AS varchar(128)) AS table_catalog, svv_external_tables.schemaname AS table_schema, svv_external_tables.tablename AS table_name, 'EXTERNAL TABLE' AS table_type, CAST(NULL AS unknown) AS remarks FROM svv_external_tables
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