cancel
Showing results for 
Search instead for 
Did you mean: 

Verify the user's privileges on object level

Currently, it is not possible to list the user's privileges on object level in a particular database.

 

The privileges need to be checked from individual catalog table from the *acl column or using meta commands for respective objects. For example:

 

              Table :

           select relacl from pg_class where relname = 'test';
             --or
           \dt+ test

              Schema :

 

           select nspacl from pg_namespace where nspname = 'test';
             --or
           \dn+ test

             Tablespace :

           select spcacl from pg_tablespace where spcname = 'tblspc';
             --or
           \db+ tblspc

 


              Function :

 

           select proacl from pg_proc where proname = 'increment';
             --or
           \df+ increment

Please refer to a workaround shared in the below link[1], which makes use of the "Access privilege inquiry functions"[2]:

 

[1] https://www.enterprisedb.com/blog/list-user-privileges-postgresqlppas-11
[2] https://www.postgresql.org/docs/11/functions-info.html

Version history
Revision #:
4 of 4
Last update:
3 weeks ago
Updated by:
 
Labels (4)