Re: exception handling in plperlu

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: exception handling in plperlu
Дата
Msg-id 29490.1174010219@sss.pgh.pa.us
обсуждение исходный текст
Ответ на exception handling in plperlu  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
Ответы Re: exception handling in plperlu  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
Список pgsql-general
"Jasbinder Singh Bali" <jsbali@gmail.com> writes:
> Actually, if I rephrase my requirement, I need to catch an exception at any
> point ,where ever it is raised, in the perl code.
> E.g during an insert, there is a foreign key contraint violation, then i
> need to catch this specific error and do something with it.

Since PG 8.0, you should be able to trap exceptions with eval{}, same as
you would do in any Perl code.

            regards, tom lane

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

Предыдущее
От: "Jasbinder Singh Bali"
Дата:
Сообщение: exception handling in plperlu
Следующее
От: "Jasbinder Singh Bali"
Дата:
Сообщение: Re: exception handling in plperlu