Name: | view_routine_usage |
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 |
|
specific_catalog | sql_identifier | -1 |
|
specific_schema | sql_identifier | -1 |
|
specific_name | sql_identifier | -1 |
CREATE VIEW view_routine_usage AS
SELECT DISTINCT (current_database())::sql_identifier AS table_catalog, (nv.nspname)::sql_identifier AS table_schema, (v.relname)::sql_identifier AS table_name, (current_database())::sql_identifier AS specific_catalog, (np.nspname)::sql_identifier AS specific_schema, ((((p.proname)::text || '_'::text) || (p.oid)::text))::sql_identifier AS specific_name FROM pg_namespace nv, pg_class v, pg_depend dv, pg_depend dp, pg_proc p, pg_namespace np WHERE ((((((((((((nv.oid = v.relnamespace) AND (v.relkind = 'v'::"char")) AND (v.oid = dv.refobjid)) AND (dv.refclassid = ('pg_class'::regclass)::oid)) AND (dv.classid = ('pg_rewrite'::regclass)::oid)) AND (dv.deptype = 'i'::"char")) AND (dv.objid = dp.objid)) AND (dp.classid = ('pg_rewrite'::regclass)::oid)) AND (dp.refclassid = ('pg_proc'::regclass)::oid)) AND (dp.refobjid = p.oid)) AND (p.pronamespace = np.oid)) AND pg_has_role(p.proowner, 'USAGE'::text)) ORDER BY (current_database())::sql_identifier, (nv.nspname)::sql_identifier, (v.relname)::sql_identifier, (current_database())::sql_identifier, (np.nspname)::sql_identifier, ((((p.proname)::text || '_'::text) || (p.oid)::text))::sql_identifier;
ALTER TABLE information_schema.view_routine_usage OWNER TO postgres;
See Also
List of views