Postgres get function owner
There is a simple and a complicated way.

The complicated way is to join with pg_roles and get the user name from there.

But since PostgreSQL hackers don't want to type more than necessary, they came up with something else:

Internally, every object is not identified by its name (which is mutable) but by its &ldquo;object ID&rdquo;. This is the number that is for example used in the proowner column of pg_proc.

Now there are the so-called &ldquo;object identifier types&rdquo;. Internally such a type is just the oid, but the type output function, which is used for display of the type, renders it as the object's name.

Put that together with PostgreSQL's type cast operator ::, and you can do:

SELECT proname,
       proowner::regrole
FROM pg_proc
WHERE pronamespace::regnamespace::text = 'public';


Additional hint: maybe you would prefer oid::regprocedure over proname.