Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check permissions to functions under psql console

Could you tell me please how to check permissions to functions with psql console but without being overwhelmed with source code and descirption (like when using \df+).

like image 273
MiB Avatar asked Jun 11 '10 10:06

MiB


1 Answers

For a simpler query, use:

SELECT proacl FROM pg_proc WHERE proname='FUNCTION-NAME';

The results is like:

                           proacl                       
----------------------------------------------------
 {=X/postgres,postgres=X/postgres,test1=X/postgres}
(1 row)

which shows that test1 user also has access to this function.

For more details, see the discussion on psql's mailing list: psql missing feature: show permissions for functions.

like image 91
Amir Ali Akbari Avatar answered Dec 19 '22 20:12

Amir Ali Akbari