pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: gherzig@fmed.uba.ar
Cc: pgsql-sql@postgresql.org
Subject: Re: calling EXECUTE on any exception
Date: Fri, 29 Jul 2005 08:45:33 -0600
Message-ID: <20050729144533.GA84062@winnie.fuhr.org> (raw)
In-Reply-To: <35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar>
References: <35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar>

On Fri, Jul 29, 2005 at 10:36:52AM -0300, gherzig@fmed.uba.ar wrote:
> EXCEPTION
>   WHEN OTHER THEN
>     EXECUTE exception_handler(Exception_code)
>
> how do i get that error_code (or code_name, whatever i can get)
> generated in the something() function to be proccesed by the
> exception_handler() function?

I don't think you can do this in released versions of PostgreSQL.
In 8.1 you'll be able to use SQLSTATE to get the error code and
SQLERRM to get the error message.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (3+ messages)  latest in thread

Message-ID: <20050729144533.GA84062@winnie.fuhr.org>
Permalink:  ../20050729144533.GA84062@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050729144533.GA84062@winnie.fuhr.org

 · 

reply

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: mike@fuhr.org, gherzig@fmed.uba.ar
  Subject: Re: calling EXECUTE on any exception
  In-Reply-To: <20050729144533.GA84062@winnie.fuhr.org>

* 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