select p.proname,(for($i=0;$i<p.pronargs;$i++ { t.typename where
t.oid=p.proargtypes[$i] }
from pg_proc p, pg_type t;
Of course, I am aware that this is a bad syntax but this pseudocode is
the best way to describe what I want to achieve. The issue is the array
handling.
You mean something like that?
SELECT
p.proname,
(SELECT array_agg(t.typname)
FROM unnest(p.proargtypes) AS o(oid) JOIN
pg_type AS t ON (o.oid=t.oid)) AS argtypes
FROM pg_proc AS p;
Yours,
Laurenz Albe
If you are on 8.4 you can use:
SELECT proname,
pg_catalog.pg_get_function_arguments(oid)
FROM pg_proc;
Thomas