From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: jbe-mlist@magnetkern.de, PostgreSQL-development <pgsql-hackers@lists.postgresql.org>
Subject: Re: Parameter NOT NULL to CREATE DOMAIN not the same as CHECK (VALUE IS NOT NULL)
Date: Mon, 7 Apr 2025 21:34:06 -0400
Message-ID: <Z_R9Dkq28Rlg8EDj@momjian.us> (raw)
In-Reply-To: <Z5t-HtfrECeNegGZ@momjian.us>
References: <173591158454.714.7664064332419606037@wrigleys.postgresql.org>
<Z37p0paENWWUarj-@momjian.us>
<1694911.1736371474@sss.pgh.pa.us>
<Z5t-HtfrECeNegGZ@momjian.us>
On Thu, Jan 30, 2025 at 08:26:54AM -0500, Bruce Momjian wrote:
> On Wed, Jan 8, 2025 at 04:24:34PM -0500, Tom Lane wrote:
> > Bruce Momjian <bruce@momjian.us> writes:
> > > I think this needs some serious research.
> >
> > We've discussed this topic before. The spec's definition of IS [NOT]
> > NULL for composite values is bizarre to say the least. I think
> > there's been an intentional choice to keep most NOT NULL checks
> > "simple", that is we look at the overall value's isnull bit and
> > don't probe any deeper than that.
> >
> > If the optimizations added in v17 changed existing behavior,
> > I agree that's bad. We should probably fix it so that those
> > are only applied when argisrow is false.
>
> I have developed the attached patch using your argisrow suggestion which
> fixes the test I posted. Is this something we should backpatch?
Patch applied. This fix will appear in the next minor PG 17 release.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.
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 using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Subject: Re: Parameter NOT NULL to CREATE DOMAIN not the same as CHECK (VALUE IS NOT NULL)
In-Reply-To: <Z_R9Dkq28Rlg8EDj@momjian.us>
* 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