- Mailing list pgsql-general

From Florian Ledoux
Subject
Date
Msg-id d4f1fdd90510100841u3b25e3a9r@mail.gmail.com
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: strange error
Next
From: Ivan Pavlov
Date:
Subject: error in SELECT from store procedure