pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paolo Saudin <paolo@ecometer.it>
To: pgsql-general@postgresql.org
Subject: Get the exeption error description
Date: Thu, 24 May 2007 08:44:18 +0200
Message-ID: <002f01c79dce$f48020d0$dd806270$@it> (raw)
In-Reply-To: <3650d0d50705232254w265b94b0yaaf5163b92567403@mail.gmail.com>
References: <3650d0d50705152242y689c0ef8u56223ec15661c821@mail.gmail.com>
	<464AD62B.9000003@archonet.com>
	<3650d0d50705230134n15b993aat8bbc631836eef65e@mail.gmail.com>
	<46540766.2030108@archonet.com>
	<3650d0d50705230756g5fdf8bdava3de463eb6f82ad9@mail.gmail.com>
	<4654621C.8010700@archonet.com>
	<3650d0d50705232254w265b94b0yaaf5163b92567403@mail.gmail.com>

Hi,

Is there a way to know the error description / message in a BEGIN END block
in a plpgsql functioin as in the 'Appendix A. PostgreSQL Error Codes' ?

I would like to pass it back to the function caller

 

DECLARE

  the_error   varchar;      

BEGIN

                ..  ...   ...

                ..  ...   ...

 

      EXCEPTION WHEN OTHERS THEN

the_error :=  ERROR DESCRIPTION; ?

      END;

 

Thanks,

Paolo

view thread (2+ messages)  latest in thread

Message-ID: <002f01c79dce$f48020d0$dd806270$@it>
Permalink:  ../002f01c79dce$f48020d0$dd806270$@it/
Also on:    postgresql.org/message-id/002f01c79dce$f48020d0$dd806270$@it

 · 

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-admin@postgresql.org
  Cc: paolo@ecometer.it, pgsql-general@postgresql.org
  Subject: Re: Get the exeption error description
  In-Reply-To: <002f01c79dce$f48020d0$dd806270$@it>

* 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