Re: Problem with catching my own exception messages.

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Gorodowienko Daniel <daniel(dot)gorodowienko(at)interia(dot)pl>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with catching my own exception messages.
Date: 2005-06-24 13:31:47
Message-ID: 20050624133147.GA44969@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 07, 2005 at 05:49:10PM +0200, Gorodowienko Daniel wrote:
>
> I want to write a function that returns a raise message catched by:
> EXCEPTION
> WHEN RAISE_EXCEPTION THEN
> RETURN .........
> If exception was raise like this:
> RAISE EXCEPTION 'some exception';
> and I want to get 'some exception', so what should I write instead of
> ......... ???

As far as I know you can't do this in any released version of
PostgreSQL, but in 8.1 you'll be able to get the error message
from the SQLERRM variable.

http://archives.postgresql.org/pgsql-committers/2005-06/msg00135.php

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-06-24 13:44:15 Re: Win32 users?
Previous Message Douglas McNaught 2005-06-24 12:58:16 Re: Raid and tablespaces configuration