Re: WIP: generalized index constraints

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: WIP: generalized index constraints
Дата
Msg-id 37ed240d0909150621k7cb23bd3x4c278124636a00f4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: generalized index constraints  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: WIP: generalized index constraints
Re: WIP: generalized index constraints
Список pgsql-hackers
2009/9/15 Jeff Davis <pgsql@j-davis.com>:
> Attached is the latest version.
>

The new error message for a conflict is:

ERROR:  index constraint violation detected
DETAIL:  tuple conflicts with existing data

How about also including the name of the constraint (or index) that
was violated?  I could imagine this error message being frustrating
for someone who had a table with multiple index constraints, as they
wouldn't know which one had raised the conflict.

Also, the DETAIL part should be written as a full sentence with
leading capital and full stop [1], see

I deliberately tried to create an index constraint using a bogus
operator, to see what would happen:

postgres=# alter table circles add constraint circles_overlap (c <->)
using index circle_idx;
ERROR:  no strategy found for operator 1520 in operator family 2595

The error message is pretty unfriendly, but I'm ambivalent about
whether it's worth doing anything about this particular case.

One of the comments I made in my original review [2] was that "\d" in
psql should show the constraint.  I don't think you've addressed this
in the current version.

Cheers,
BJ

[1] http://www.postgresql.org/docs/current/static/error-style-guide.html
[2] http://archives.postgresql.org/message-id/37ed240d0907152222w7ccfc13i8ce8d11a0c517e8@mail.gmail.com


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

Предыдущее
От: Brendan Jurd
Дата:
Сообщение: Re: WIP: generalized index constraints
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Linux LSB init script