views:

310

answers:

2

Is there a decent IDE-like tool for writing and debugging PL/pgSQL functions, e.g. for writing stored procedures?

I find it an exercise in frustration using pgAdmin III, because the error messages are often deeply cryptic and things have a habit of failing in mysterious ways.

A: 

Those products list PL/pgSQL Debugger as a feature: PostgreSQL Maestro, EMS SQL Manager for PostgreSQL, Postgres Plus® Advanced Server.

I haven't used any of them though.

Milen A. Radev
+2  A: 

Hello

I using classic programmer editor like emacs, vi, eclipse. I have one rule: store every code to file. Classic editors are usually better tools for editing code than DBA specialised IDE managers. psql has important command \i file for import edited file to PostgreSQL.

p.s. Emacs has very nice support for sql and is very well integrated with Postgres.

My second rule - don't use GUI managers for editing stored procedures. You cannot comment code, you have not control over sources. You cannot put related procedures to one file. IDE allows editing only isolated procedures, and it is very bad - for maintenance more than ten procedures.

Pavel Stehule