Re: Problem with catching my own exception messages.

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Problem with catching my own exception messages.
Дата
Msg-id 20050624133147.GA44969@winnie.fuhr.org
обсуждение исходный текст
Ответ на Problem with catching my own exception messages.  ("Gorodowienko Daniel" <daniel.gorodowienko@interia.pl>)
Ответы Libpq question  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Список 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/

В списке pgsql-general по дате отправления:

Предыдущее
От: "mrix"
Дата:
Сообщение: Re: fields and foreign keys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Win32 users?