Re: alter check constraint enforceability - Mailing list pgsql-hackers

From jian he
Subject Re: alter check constraint enforceability
Date
Msg-id CACJufxFsSO7yA0orXwwRROXePeW-qSEOuJbRGHFFZLy8e6pLzA@mail.gmail.com
Whole thread Raw
In response to Re: alter check constraint enforceability  (Robert Treat <rob@xzilla.net>)
List pgsql-hackers
On Fri, Nov 7, 2025 at 7:29 AM Robert Treat <rob@xzilla.net> wrote:
>
> > Hi!
> > I looked at v3.
> >
> > Should we rename `ATExecAlterConstrEnforceability` to
> > `ATExecAlterFKConstrEnforceability `?
> >
>
> +1
>
> Robert Treat
> https://xzilla.net

hi.

AlterConstrEnforceabilityRecurse renamed to
AlterFKConstrEnforceabilityRecurse

ATExecAlterConstrEnforceability renamed to
ATExecAlterFKConstrEnforceability.

There seem to be no tests for cases where a partitioned table’s check constraint
is not enforced, but the partition’s constraint is enforced. I’ve added tests
for this case.

ATExecAlterCheckConstrEnforceability
``rel = table_open(currcon->conrelid, NoLock);``

NoLock is ok, because parent is already locked, obviously,
``find_all_inheritors(RelationGetRelid(rel), lockmode, NULL); ``
will lock all the children with lockmode.


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

Attachment

pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Kirill Reshke
Date:
Subject: Re: Fix crash during recovery when redo segment is missing