Re: Constraint violations don't report the value that violates
В списке pgsql-general по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера