Re: Fix bug of CHECK constraint enforceability recursion

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, "L(dot) pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Fix bug of CHECK constraint enforceability recursion
Date: 2026-05-26 07:46:46
Message-ID: 33E9C4C2-B6A8-4FCC-BEEA-461EA5FB98C8@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On May 26, 2026, at 15:32, Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> On 2026-05-26, Chao Li wrote:
>>> On May 26, 2026, at 14:05, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>
>>> Overall, i tend to think that we should reject ALTER TABLE ALTER
>>> CONSTRAINT if it
>>> would result in the parent constraint being enforced while the child constraint
>>> is not enforced.
>
> Yeah.
>
>> I am not against the idea of "rejecting ALTER TABLE ALTER CONSTRAINT if
>> it would result in the parent constraint being enforced while the child
>> constrain is not enforced", but I’m afraid it’s too late for PG19. So,
>> I guess we still need to fix the issue for 19, right?
>
> I think this is a bug that we need to fix in 19 as well — I mean we should reject the ALTER TABLE.
>
> --
> Álvaro Herrera

Thanks for your comment. Let me rework the patch.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-05-26 08:09:31 Re: Failure in test_slru for host gokiburi (REL_16_STABLE only)
Previous Message Chao Li 2026-05-26 07:44:01 Re: Fix bug of CHECK constraint enforceability recursion