Re: Constraint violations don't report the value that violates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Constraint violations don't report the value that violates
Дата
Msg-id 20248.1202342474@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Constraint violations don't report the value that violates  (Russell Smith <mr-russ@pws.com.au>)
Ответы Re: Constraint violations don't report the value that violates
Список pgsql-general
Russell Smith <mr-russ@pws.com.au> writes:
> I've would find it useful if check constraints and unique constraints
> would give a value which is violating the constraint.

> Foreign keys give a value that is failing for the foreign key, is there
> a reason that other constraints don't do the same thing?

It's not very well-defined, for instance what would you report for

    CHECK some_black_box_function(a, b, c+d)

FKs are constrained by the spec syntax to only involve simple column
values, but this is not the case for either CHECK or unique indexes.

Unique partial indexes would make things even more interesting.

            regards, tom lane

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

Предыдущее
От: brian
Дата:
Сообщение: Re: Fossology Install & Config Issues...
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: DBA Book - Not "postgresql book - practical or something newer?"