From: Florian Ledoux <florian(dot)ledoux(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject:
Date: 2005-10-10 15:41:41
Message-ID: d4f1fdd90510100841u3b25e3a9r@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Having freshly installed a PG database (8.0.3), I have difficulties in
tracing exceptions in my PL/pgSQL functions. All my functions
implement a BEGIN-EXCEPTION-END block in which exceptions must be
traced :
BEGIN
-- Some stuff
EXCEPTION
WHEN OTHERS THEN
-- trace
END;

I would like to trace the SQLCODE that triggers the exception. I have
heard about a SQLSTATE variable but it doesn't seem to be implemented
in the 8.0.3 but only in the 8.1 (not stable release and so not a good
choice in a professional context...).

How can I get this information ? Is there a patch available ? Is there
a workaround ?

Thanks

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Pavlov 2005-10-10 15:43:25 error in SELECT from store procedure
Previous Message Tom Lane 2005-10-10 15:36:44 Re: strange error