debugging plpgsql functions

From: Chris <dmagick(at)gmail(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: debugging plpgsql functions
Date: 2009-02-05 01:18:04
Message-ID: 498A3E4C.6020205@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I have a few plpgsql functions to debug to see why they are slow.

They consist of a bunch of sql statements using new.* / old.* variables
(ie not using "EXECUTE", the sql is being called directly).

Is there a way to capture the actual sql that's being executed with
variables substituted in, or even an easy way to log the variables being
used?

I couldn't see anything in the manual but maybe I missed something - any
pointers appreciated.

I tried http://pgfoundry.org/projects/edb-debugger/ but after loading
the module, the functions wouldn't run properly (can't remember the
error message but I can do it again if need be).

--
Postgresql & php tutorials
http://www.designmagick.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Osvaldo Kussama 2009-02-05 01:59:19 Re: Elapsed time between timestamp variables in Function
Previous Message Jeff Davis 2009-02-04 23:33:06 Re: Sort method: external merge