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 <br...@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 <br...@momjian.us> https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.