| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | Robert Treat <rob(at)xzilla(dot)net> |
| Cc: | Kirill Reshke <reshkekirill(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: alter check constraint enforceability |
| Date: | 2025-12-04 06:51:54 |
| Message-ID: | CACJufxFsSO7yA0orXwwRROXePeW-qSEOuJbRGHFFZLy8e6pLzA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Nov 7, 2025 at 7:29 AM Robert Treat <rob(at)xzilla(dot)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.
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-alter-check-constraint-enforceability.patch | text/x-patch | 30.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kirill Reshke | 2025-12-04 07:00:23 | Re: Fix crash during recovery when redo segment is missing |
| Previous Message | shveta malik | 2025-12-04 06:51:20 | Re: Proposal: Conflict log history table for Logical Replication |