Re: Fix bug of CHECK constraint enforceability recursion

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix bug of CHECK constraint enforceability recursion
Date: 2026-06-03 14:36:53
Message-ID: CAN4CZFOOhDAWdnY1OXB1wfG_=C4g_dw0gC2HCApz_3F7EFpqJA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

After a bit more testing, I think there's still a remaining issue with
the latest patch:

create table root_t (a int constraint c check (a > 0) enforced);
create table p2 (a int constraint c check (a > 0) enforced);
create table d () inherits (root_t, p2);
create table e () inherits (d);
create table f () inherits (e);
alter table root_t alter constraint c not enforced;
insert into e values (-5); -- succeeds

d remains enforced as it should, but e and f doesn't.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-06-03 14:37:54 Re: alert clients when prepared statements are deallocated
Previous Message Zsolt Parragi 2026-06-03 14:14:53 Re: alert clients when prepared statements are deallocated