Re: Parameter NOT NULL to CREATE DOMAIN not the same as CHECK (VALUE IS NOT NULL) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Parameter NOT NULL to CREATE DOMAIN not the same as CHECK (VALUE IS NOT NULL)
Date
Msg-id 1694911.1736371474@sss.pgh.pa.us
Whole thread Raw
In response to Re: Parameter NOT NULL to CREATE DOMAIN not the same as CHECK (VALUE IS NOT NULL)  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Parameter NOT NULL to CREATE DOMAIN not the same as CHECK (VALUE IS NOT NULL)
Next
From: Ilia Evdokimov
Date:
Subject: Re: Sample rate added to pg_stat_statements