I would like to list my functions & stored procedures along with the roles that are able to execute them. I can get similar information on tables via
SELECT grantee
, CONCAT(table_schema, '.', table_name) schema_table
, CASE WHEN COUNT(privilege_type) = 7 THEN 'ALL' ELSE ARRAY_TO_STRING(ARRAY_AGG(privilege_type), ', ') END granted_privileges
FROM information_schema.role_table_grants
GROUP BY table_name, table_schema, grantee
ORDER BY grantee, table_schema, table_name;
I would like the equivalent of this for functions & stored procedures. I am using Postgres v15. Thanks for your help