Name: | views |
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 |
|
view_definition | character_data | -1 |
|
check_option | character_data | -1 |
|
is_updatable | character_data | -1 |
|
is_insertable_into | character_data | -1 |
CREATE VIEW views 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 pg_has_role(c.relowner, 'USAGE'::text) THEN pg_get_viewdef(c.oid) ELSE NULL::text END)::character_data AS view_definition, ('NONE'::character varying)::character_data AS check_option, (CASE WHEN ((EXISTS (SELECT 1 FROM pg_rewrite WHERE (((pg_rewrite.ev_class = c.oid) AND ((pg_rewrite.ev_type)::text = (2)::text)) AND pg_rewrite.is_instead))) AND (EXISTS (SELECT 1 FROM pg_rewrite WHERE (((pg_rewrite.ev_class = c.oid) AND ((pg_rewrite.ev_type)::text = (4)::text)) AND pg_rewrite.is_instead)))) THEN 'YES'::text ELSE 'NO'::text END)::character_data AS is_updatable, (CASE WHEN (EXISTS (SELECT 1 FROM pg_rewrite WHERE (((pg_rewrite.ev_class = c.oid) AND ((pg_rewrite.ev_type)::text = (3)::text)) AND pg_rewrite.is_instead))) THEN 'YES'::text ELSE 'NO'::text END)::character_data AS is_insertable_into FROM pg_namespace nc, pg_class c WHERE ((((c.relnamespace = nc.oid) AND (c.relkind = '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.views OWNER TO postgres;
See Also
List of views