Name: | tables |
Owner: | postgres |
Has rules: | |
Has Triggers: | |
Comment: |
Name | Type | Length | |
|
table_catalog | sql_identifier | -1 |
|
table_schema | sql_identifier | -1 |
|
table_name | sql_identifier | -1 |
|
table_type | character_data | -1 |
|
self_referencing_column_name | sql_identifier | -1 |
|
reference_generation | character_data | -1 |
|
user_defined_type_catalog | sql_identifier | -1 |
|
user_defined_type_schema | sql_identifier | -1 |
|
user_defined_type_name | sql_identifier | -1 |
|
is_insertable_into | character_data | -1 |
|
is_typed | character_data | -1 |
|
commit_action | character_data | -1 |
CREATE VIEW tables AS
SELECT (current_database())::sql_identifier AS table_catalog, (nc.nspname)::sql_identifier AS table_schema, (c.relname)::sql_identifier AS table_name, (CASE WHEN (nc.oid = pg_my_temp_schema()) THEN 'LOCAL TEMPORARY'::text WHEN (c.relkind = 'r'::"char") THEN 'BASE TABLE'::text WHEN (c.relkind = 'v'::"char") THEN 'VIEW'::text ELSE NULL::text END)::character_data AS table_type, (NULL::character varying)::sql_identifier AS self_referencing_column_name, (NULL::character varying)::character_data AS reference_generation, (NULL::character varying)::sql_identifier AS user_defined_type_catalog, (NULL::character varying)::sql_identifier AS user_defined_type_schema, (NULL::character varying)::sql_identifier AS user_defined_type_name, (CASE WHEN (c.relkind = 'r'::"char") THEN 'YES'::text ELSE 'NO'::text END)::character_data AS is_insertable_into, ('NO'::character varying)::character_data AS is_typed, (CASE WHEN (nc.oid = pg_my_temp_schema()) THEN 'PRESERVE'::text ELSE NULL::text END)::character_data AS commit_action FROM pg_namespace nc, pg_class c WHERE ((((c.relnamespace = nc.oid) AND (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char"]))) AND (NOT pg_is_other_temp_schema(nc.oid))) AND ((((((pg_has_role(c.relowner, 'USAGE'::text) OR has_table_privilege(c.oid, 'SELECT'::text)) OR has_table_privilege(c.oid, 'INSERT'::text)) OR has_table_privilege(c.oid, 'UPDATE'::text)) OR has_table_privilege(c.oid, 'DELETE'::text)) OR has_table_privilege(c.oid, 'REFERENCES'::text)) OR has_table_privilege(c.oid, 'TRIGGER'::text)));
ALTER TABLE information_schema.tables OWNER TO postgres;
See Also
List of views