Visual debugging
The PL/pgSQL Debugger is a project hosted on pgFoundry
that provides a debugging interface into PostgreSQL Version 8.2 or higher. The following statement is mentioned at http://pgfoundry.org/projects/edb-debugger/:
"The PL/pgSQL debugger lets you step through PL/pgSQL code, set and clear breakpoints, view and modify variables, and walk through the call stack. "
As you can see from the description, the PL/pgSQL Debugger can be quite a handy little tool to have in your arsenal.
Getting the debugger installed
Ok, now we move past the glamour, and need to actually get it running on your system. If you installed PostgreSQL with one of packages that contain the Debugger, installation is pretty simple. Otherwise, you will need to build it from source.
Building the PL/pgSQL Debugger from source is beyond the scope of this book. The best way to build the source would be to pull the latest version for the Concurrent Versions System (CVS) source control system and follow the README file...