Friday, February 15

Rafael’s PlanetPostgreSQL

OmniDB – Now with PL/pgSQL debugger!

OmniDB, Rafael's PlanetPostgreSQL
OmniDB's 2.3.0 release, which is coming out on November 2nd, comes with a much requested feature: a debugger for PL/pgSQL functions. This post will walk you through the steps to start debugging your functions inside OmniDB. 1. Requirements The debugger takes advantage of hooks, an extensibility in PostgreSQL's source code that allows us to perform custom actions when specific actions are performed in the database. For the debugger we use hooks that are triggered when PL/pgSQL functions are called, and each statement is executed. This requires the user to install a binary library and enable it in PostgreSQL's config file. The debugger also uses a special schema with special tables to control the whole debugging process. This can be manually created or with an extension. 2. (more…)