Re: Check constraints on partition parents only?

Поиск
Список
Период
Сортировка
От Nikhil Sontakke
Тема Re: Check constraints on partition parents only?
Дата
Msg-id CABamaqN3Vxm4ige3ND7LzbC7UwuZkESuNvK8V7C4ad7SW9Uhzw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Check constraints on partition parents only?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Check constraints on partition parents only?
Список pgsql-hackers
 
This approach certainly can't work, because a table can be both an
inheritance parent and an inheritance child.  It could have an ONLY
constraint, and also inherit a copy of the same constraint for one or
more parents.  IOW, the fact that conislocal = true does not mean that
coninhcount is irrelevant.  

Oh I see. 
 
I think what you probably want to do is
either (a) add a new column or (b) change conislocal to a char value
and make it three-valued:

n = inherited constraint, no local definition
o = defined locally as an "ONLY" constraint
i = defined locally as a non-ONLY constraint

I think I favor the latter approach as more space-efficient, but I
hear Tom muttering about backward-compatibility...


Yeah, in your case too an initdb would be required, so might as well go down the route of a new column. Any preferences for the name? 

connoinh
conisonly
constatic or confixed

Others?

Regards,
Nikhils 

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Check constraints on partition parents only?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: sinval synchronization considered harmful