0

I found how to list tables a role has permissions on. I found how to list all functions with arguments.

My question is: How to list all functions with arguments a role is allowed to execute?

1

You can use the has_function_privilege function for that:

SELECT p.pronamespace::regnamespace as schema,
       p.proname||'('||pg_get_function_arguments(p.oid)||')' as function
FROM pg_proc p 
WHERE has_function_privilege(p.oid, 'execute');
  and p.pronamespace <> 'pg_catalog'::regnamespace;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.