Viewing function bodies

You want to see the source for a previously defined function.

Solution

You can use either of the following:

\df+ myfunc
select oid,proname,prosrc from pg_proc where proname='myfunc';