how to display full stored procedure code?

darren picture darren · Aug 19, 2010 · Viewed 125.3k times · Source

How do you view a stored procedure/function?

Say I have an old function without the original definition - I want to see what it is doing in pg/psql but I can't seem to figure out a way to do that.

using Postgres version 8.4.1

Answer

Milen A. Radev picture Milen A. Radev · Aug 19, 2010

\df+ <function_name> in psql.