Debugging Pl/PgSQL functions with the debug contrib module

From: "Peter Geoghegan" <peter(dot)geoghegan86(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Debugging Pl/PgSQL functions with the debug contrib module
Date: 2008-04-09 10:15:52
Message-ID: db471ace0804090315s4117b24are2267fa5785bc1e9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I'm developing a large postgreSQL database front end application on
win32. I'd consider the ability to debug Pl/PgSQL functions highly
desirable. Until now, I've been using RAISE NOTICE debugging, which is
equivalent to printf debugging, and is sub optimal.

I am aware of the possibility of debugging Pl/PgSQL functions through
edb-debugger. I am unable to get this to work.

According to the PgAdmin III 1.8.2 documentation, "In order to use the
debugger, a plugin is required on your server. This is included by
default with EnterpriseDB, and is available for download on pgFoundry.
It is installed as a contrib module with the Windows distribution of
PostgreSQL 8.3 and above". When I recently installed postgreSQL 8.3.1
from the win32 MSI binary distribution, there was no reference to this
contrib module. There was also no reference to it in the bundled
"stack builder" application. What did I miss?

It is not apparent to me how I can test for the absence or presence of
this module within PgAdmin III. In the tools menu, there is a
"debugging" tab, but it is disabled in all of the contexts that I've
tried so far. I downloaded Lightning debugger, a tool that expressly
debugs Pl/PgSQL. When I attempt to connect to my database, a message
box appears:
---------------------------
WARNING
---------------------------
Debugger not supported:

Database missing debugger API functions
---------------------------
OK
---------------------------

The only available on PgFoundry is a source distribution:
http://pgfoundry.org/frs/?group_id=1000175 . Building this would
necessitate setting up a mingw build environment, which would be a lot
of effort.

What is the simplest, most direct way of enabling debugging of
Pl/PgSQL under these circumstances?

Thanks,

Peter Geoghegan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message leoabhi 2008-04-09 10:20:03 connecting VB to postgreSQL
Previous Message Richard Huxton 2008-04-09 10:03:53 Re: select statement fails