How can I get a list of all functions stored in the database of a particular schema in PostgreSQL?

Rudd Zwolinski picture Rudd Zwolinski · Aug 28, 2009 · Viewed 172.1k times · Source

I want to be able to connect to a PostgreSQL database and find all of the functions for a particular schema.

My thought was that I could make some query to pg_catalog or information_schema and get a list of all functions, but I can't figure out where the names and parameters are stored. I'm looking for a query that will give me the function name and the parameter types it takes (and what order it takes them in).

Is there a way to do this?

Answer

Milen A. Radev picture Milen A. Radev · Aug 28, 2009
\df <schema>.*

in psql gives the necessary information.

To see the query that's used internally connect to a database with psql and supply an extra "-E" (or "--echo-hidden") option and then execute the above command.