databasepostgresqlstored-proceduresplpgsqlfunction-definition

Show full stored function or procedure code in PostgreSQL?


How do you view a stored function or procedure?

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


Solution

  • use pgAdmin or use pg_proc to get the source of your stored procedures. pgAdmin does the same.