Question about catching exception

Поиск
Список
Период
Сортировка
От A B
Тема Question about catching exception
Дата
Msg-id AANLkTikhV_jiroxUNT+WbVv4myCxrasFajO0TfdtdEK+@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question about catching exception
Список pgsql-general
Hello!

I have a question about catching exceptions.

If I write a plpgsql function like this

begin
   do stuff;
exception
 when X then
    ....
when Y then
  ...
end;

If the "do stuff" part can result in two different unique_violation
exception (having two unique constraints), how can I detect which one
was triggered?

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

Предыдущее
От: "James B. Byrne"
Дата:
Сообщение: Re: PGError: ERROR: missing FROM-clause entry for table
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Question about catching exception