Re: Problem identifying constraints which should not be inherited
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Problem identifying constraints which should not be inherited |
| Дата | |
| Msg-id | 4698.1176408701@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Problem identifying constraints which should not be inherited ("Chris Fischer" <Chris.Fischer@channeladvisor.com>) |
| Ответы |
Re: Problem identifying constraints which should not
be inherited
|
| Список | pgsql-bugs |
"Chris Fischer" <Chris.Fischer@channeladvisor.com> writes:
> alter table only t1 add constraint ck_col1 check (number <> 0);
The bug here is that we allow that. Continuing your example,
regression=# insert into t2 values(0);
INSERT 0 1
regression=# select * from t1;
col1
------
0
(1 row)
which sure looks to me like a violation of the principle of least
surprise.
This has come up before and I think the consensus was to disallow
non-inherited check constraints; not sure why it hasn't been done yet.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера