| От | Tom Lane |
|---|---|
| Тема | Re: Conflicting constraint being merged |
| Дата | |
| Msg-id | 30414.1476390909@sss.pgh.pa.us обсуждение |
| Ответ на | Conflicting constraint being merged (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
| Список | pgsql-hackers |
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
> Currently, if child table has a non-inherited constraint and a constraint
> with the same name is added to the parent, it will fail with an error as
> illustrated below:
> ...
> If we had allowed it to be merged, any children of child itself won't
> inherit that constraint (because on child it's marked NO INHERIT), which
> would not be good.
Right. Merging must happen only for inheritable constraints.
> However, it is still possible for a child to override/hide the parent's
> constraint as follows:
Hmm, I thought I'd checked for this when I was fooling with constraint
merging a few days ago. I must have checked one of the other cases and
missed this path. Thanks for catching it!
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера