Re: User's exception plpgsql

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: User's exception plpgsql
Дата
Msg-id 42E5D178.8020404@samurai.com
обсуждение исходный текст
Ответ на Re: User's exception plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
> Those cases are for places where the spec defines similar cases under
> the error classes "SQL Routine Exception" and "External Routine Exception".
> You can blame me for having assumed that plpgsql didn't need to
> distinguish these cases.

Well, in and of itself, I agree it is probably better to combine similar
SQLSTATEs into a single logical condition. However, considering the
problem it poses for implementing RAISE with builtin condition names,
IMHO it would be a net win to get rid of it, if we can't find a better
solution.

> So I see no backwards-compatibility argument that we can't change
> this.  How would you want to do it better?

I would just change the mapping from condition names to SQLSTATEs to be
one-to-one. If a client application does need to trap multiple SQLSTATEs
for a logically similar condition, they can always specify "WHEN x OR y
OR ..."

-Neil

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: User's exception plpgsql
Следующее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: [HACKERS] Autovacuum loose ends