pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joao Rito <joaovictor.rito@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19807: CHECK constraint not enforced on partitioned table
Date: Sat, 14 Nov 2026 18:33:45 -0300
Message-ID: <20261114213345.227-1-joaovictor.rito@gmail.com> (raw)
In-Reply-To: <CAFiTN-uNDsqxhMikKXqtpjTKWvFipay1mFfDdNfxZ9_ZAZG8eQ@mail.gmail.com>
References: <CAFiTN-uNDsqxhMikKXqtpjTKWvFipay1mFfDdNfxZ9_ZAZG8eQ@mail.gmail.com>

Hi Dilip,

I tested v1 on current master (206e719, cassert, tap tests) and it applies cleanly. With constraint_exclusion=on, "WHERE NOT (f3 > 30)" and "WHERE f3 IS NULL" on the parent returned 0 rows before the patch. After the patch they return (12, 24) and (10, NULL), and the plan scans gp2. The result also holds after a pg_dump and restore. The regress suite passes (243 subtests) and I saw no assertion failures in the server log.

What I did not test: the isolation and tap suites, pgindent, the docs, and a CHECK constraint with a whole-row reference (my attempt failed at DDL time, so I could not tell).

Small points: the line with TupleDescAttr(...) is longer than 80 columns, and the test could add a direct scan of the partition (include_noinherit true) to show that its own constraints are still used. Do you think the INSERT and trigger WHEN cases from the report need a separate follow-up?

Regards,
Joao Rito






view thread (3+ messages)

Message-ID: <20261114213345.227-1-joaovictor.rito@gmail.com>
Permalink:  ../20261114213345.227-1-joaovictor.rito@gmail.com/
Also on:    postgresql.org/message-id/20261114213345.227-1-joaovictor.rito@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: joaovictor.rito@gmail.com, dilipbalaut@gmail.com
  Subject: Re: BUG #19807: CHECK constraint not enforced on partitioned table
  In-Reply-To: <20261114213345.227-1-joaovictor.rito@gmail.com>
  References: <CAFiTN-uNDsqxhMikKXqtpjTKWvFipay1mFfDdNfxZ9_ZAZG8eQ@mail.gmail.com> <20261114213345.227-1-joaovictor.rito@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox