postgresqldatabase-permissions

PostgreSQL: How to view current "grant usage on schema" permissions?


Is there a system view in Postgres where I can see which users/roles have "grant usage" and on which schema?


Solution

  • The grants are stored in ACLs (=Access Control Lists) for each schema. You can view them by looking a pg_namespace

    select nspname, nspacl 
    from pg_namespace
    

    The format of the acl is explained in the manual