Re: pgsql: Teach expr_is_nonnullable() to handle more expression types - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pgsql: Teach expr_is_nonnullable() to handle more expression types
Date
Msg-id CA+TgmoaLcsmc9weJr1yo1X1SwZJX1t4XXHj0SJzH8XztmN9Hdg@mail.gmail.com
Whole thread
Responses Re: pgsql: Teach expr_is_nonnullable() to handle more expression types
List pgsql-hackers
On Wed, Dec 24, 2025 at 4:02 AM Richard Guo <rguo@postgresql.org> wrote:
> Teach expr_is_nonnullable() to handle more expression types

Due to this commit, expr_is_nonnullable() claims that "IS DISTINCT
FROM never returns NULL", but execExprInterp.c's implementation for
EEOP_DISTINCT disagrees; when neither argument is NULL, it returns
null if the underlying operator does. Two Claude-written test cases
illustrating the problem are attached.

--
Robert Haas
Databricks

Attachment

pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: Proposal: SELECT * EXCLUDE (...) command
Next
From: Jacob Champion
Date:
Subject: Re: Serverside SNI support in libpq