Is a better PL/pgSQL editor /
debugger than pgAdmin III or phpPgAdmin available anywhere?
I ask because I was stuck for
two days on the following error message:
ERROR: syntax error at or
near "LOOP"
CONTEXT: compile of
PL/pgSQL function "gen_history" near line 126
?and neither of those tools
offered any more help than that. It turned out the error was a missing
?;? way back in line 53, and it took two days of trial and error and staring
at the code to find it. (On the positive side, pgAdmin III?s use of
different colors to distinguish different program elements [variables,
keywords, string constants, comments] made the staring part easier to
do.)
I?ve learned that pgAdmin
?syntax error? can mean anything from a missing ?;? to a faulty block
structure to an undeclared variable to? I don?t know what else, and as witness
the example that error may be nowhere near the line that is flagged. So
I?m looking for a PL/pgSQL tool that would at least provide more diagnostic
error messages. Preferably, it would also offer some sort of
?breakpoint? function to let the developer see the values of variables at
specified points in the code.
I looked on the pgAdmin web
site. The only place a PL/pgSQL debugger was mentioned was on the ?to
do? page, under ?major projects? (http://www.pgadmin.org/development/todo.php),
which I guess means don?t hold your breath.
As editors, the two pgAdmin
tools apparently don?t offer elementary functions such as find and replace,
which means I have to slurp my code out into a text editor when I really need
these things.
So I guess my questions
are:
- Is it the case that the
pgAdmin tools actually do offer these features, but I just haven?t found
them yet? If so, can you show me where they are?
- Are these functions available
through add-ons to either pgAdmin tool? If so, where can I get these
add-ons?
- Are there other PL/pgSQL
editors that provide these functions? If so, what? Obviously,
I?d prefer a free one, but would pay for one if necessary.
~ TIA
~
Ken