How to edit PostgreSQL stored procedure?

Paul picture Paul · Mar 25, 2012 · Viewed 24.5k times · Source

I'm slowly moving from MSSQL to PostgreSQL.

In MSSQL I could call editing of already saved procedure or function, and the administration shell (SQL Server Management Studio) showed me procedure's text, so I did not have to store its source code somewhere in text file.

How to do the same with PostgreSQL the convenient way? I'm using pgAdmin III.

Answer

Milen A. Radev picture Milen A. Radev · Mar 25, 2012

There're 2 clients included in the official distributions of Postgres - the CLI one psql and a GUI one pgAdmin. Both support what you want: for psql it's \ef and for pgAdmin - right-click on function, "Properties", "Code" tab.