From: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: Oliver Vecernik <vecernik@aon.at>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: plpgsql: debugging
Date: Thu, 23 Jan 2003 23:41:10 -0800 (PST)
Message-ID: <20030124074110.57736.qmail@web80312.mail.yahoo.com> (raw)
In-Reply-To: <3E30A718.9080703@aon.at>
--- Oliver Vecernik <vecernik@aon.at> wrote:
> Hi,
>
> Searching Google I found a thread in July 2001
> concerning the facilities
> for debugging plpgsql functions. The actual answer
> was: it should be
> improved.
>
> What is the best way to debug a plpgsql function?
>
> Oliver
This may not be the best way since its a bit
crude. Try using RAISE NOTICE every now then to
monitor the values of variables in the screen and
record it in log file.
Example :
RAISE NOTICE ''Initial value of variable =
%'',v_variable;
/* Do some computation ... */
RAISE NOTICE ''Value of variable after operation =
%'',v_variable;
hope that helps,
ludwig
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lud_nowhere_man@yahoo.com, vecernik@aon.at
Subject: Re: plpgsql: debugging
In-Reply-To: <20030124074110.57736.qmail@web80312.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox