On Tue, Jun 2, 2026 at 2:40 PM Chao Li <[email protected]> wrote:
>
> Oops! I just found that I forgot to commit a tiny comment tuning in 0001. So 
> posting v6.
>
Hi.

One partition cannot have two direct parent tables. see
ATExecAttachPartition comment:
/* A partition can only have one parent */

Also
CREATE TABLE ... PARTITION OF automatically copies the parent
constraint definition, and
ALTER TABLE ... ATTACH PARTITION already rejects cases where the
parent is enforced but the child is not.

Therefore, I think calling ATCheckCheckConstrHasEnforcedParent once is
enough for partition inheritance.

Also please check the attached minor refactoring.



--
jian
https://www.enterprisedb.com/

Attachment: checkconstr_inheritance_issue.nocfbot
Description: Binary data

Reply via email to