views:

31

answers:

1

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+).

A: 

You could query the system tables:

SELECT proname, rolname
  FROM pg_proc pr,
       pg_type tp,
       pg_authid id
 WHERE proowner = id.oid
   AND tp.oid = pr.prorettype
   AND pr.proisagg = FALSE
   AND tp.typname <> 'trigger'
   AND pr.pronamespace IN (
       SELECT oid
         FROM pg_namespace
        WHERE nspname NOT LIKE 'pg_%'
          AND nspname != 'information_schema'
);
pcent