Visual debugging

The PL/pgSQL debugger is a project hosted on PostgreSQL Git that provides a debugging interface into PostgreSQL Version 8.2 or higher. The project is hosted at http://git.postgresql.org/gitweb/?p=pldebugger.git;a=summary.

The PL/pgSQL debugger lets you step through the 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.

Installing the debugger

OK, now we will move past the glamour and actually get the debugger running on our system. If you install PostgreSQL with one of the packages that contains the debugger, the installation is pretty simple. Otherwise, you will need ...

Get PostgreSQL Server Programming - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.