Re: calling EXECUTE on any exception

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: calling EXECUTE on any exception
Дата
Msg-id 20050729144533.GA84062@winnie.fuhr.org
обсуждение исходный текст
Ответ на calling EXECUTE on any exception  (gherzig@fmed.uba.ar)
Ответы Re: calling EXECUTE on any exception  (gherzig@fmed.uba.ar)
Список pgsql-sql
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/


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

Предыдущее
От: gherzig@fmed.uba.ar
Дата:
Сообщение: calling EXECUTE on any exception
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Why are these queries so different in time?