Re: enhanced error fields

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: enhanced error fields
Дата
Msg-id 20121229225704.GG16126@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: enhanced error fields  (Peter Geoghegan <peter@2ndquadrant.com>)
Ответы Re: enhanced error fields
Список pgsql-hackers
Peter,

* Peter Geoghegan (peter@2ndquadrant.com) wrote:
> if (constraint_name == "upc")
>     MessageBox("That is not a valid barcode.");

So they'll quickly realize that a lookup-table based on constraint name
would be useful, create it, and then have a primary key on it to make
sure that they don't have any duplicates.  Of course, this is all
duplicating what we're *already* keeping track of, except that method
won't be consistent with the catalog and they could end up with a single
entry in their table which corresponds to multiple actual constraints in
the system and begin subtly returning errors that don't make any sense
to the end user.

That's exactly the kind of subtly broken situation that I would hope
we'd try to keep them from getting into.

I'd almost rather return the OID and provide some lookup functions.
Thanks,
    Stephen

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: enhanced error fields
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: enhanced error fields