Properties

Name: role_routine_grants 
Owner: postgres 
Has rules:  
Has Triggers:  
Comment:  

Columns

Name Type Length
  grantor  sql_identifier  -1 
  grantee  sql_identifier  -1 
  specific_catalog  sql_identifier  -1 
  specific_schema  sql_identifier  -1 
  specific_name  sql_identifier  -1 
  routine_catalog  sql_identifier  -1 
  routine_schema  sql_identifier  -1 
  routine_name  sql_identifier  -1 
  privilege_type  character_data  -1 
  is_grantable  character_data  -1 
Total: 10 column(s)

SQL


CREATE VIEW role_routine_grants AS
    SELECT (u_grantor.rolname)::sql_identifier AS grantor, (g_grantee.rolname)::sql_identifier AS grantee, (current_database())::sql_identifier AS specific_catalog, (n.nspname)::sql_identifier AS specific_schema, ((((p.proname)::text || '_'::text) || (p.oid)::text))::sql_identifier AS specific_name, (current_database())::sql_identifier AS routine_catalog, (n.nspname)::sql_identifier AS routine_schema, (p.proname)::sql_identifier AS routine_name, ('EXECUTE'::character varying)::character_data AS privilege_type, (CASE WHEN aclcontains(p.proacl, makeaclitem(g_grantee.oid, u_grantor.oid, 'EXECUTE'::text, true)) THEN 'YES'::text ELSE 'NO'::text END)::character_data AS is_grantable FROM pg_proc p, pg_namespace n, pg_authid u_grantor, pg_authid g_grantee WHERE (((p.pronamespace = n.oid) AND aclcontains(p.proacl, makeaclitem(g_grantee.oid, u_grantor.oid, 'EXECUTE'::text, false))) AND ((u_grantor.rolname IN (SELECT enabled_roles.role_name FROM enabled_roles)) OR (g_grantee.rolname IN (SELECT enabled_roles.role_name FROM enabled_roles))));


ALTER TABLE information_schema.role_routine_grants OWNER TO postgres;

See Also

List of views