Re: Bug: var_is_nonnullable() gives wrong results for old/new in RETURNING - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Bug: var_is_nonnullable() gives wrong results for old/new in RETURNING
Date
Msg-id CAMbWs4_Kd4Ep6ufUWLG78ZTAbFcZ-rriY8YQ1zd3iqFqtRnGPQ@mail.gmail.com
Whole thread
In response to Re: Bug: var_is_nonnullable() gives wrong results for old/new in RETURNING  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-hackers
On Fri, Apr 10, 2026 at 2:48 PM Richard Guo <guofenglinux@gmail.com> wrote:
> The patch also LGTM.  I also checked if has_notnull_forced_var() has
> the same issue, but it doesn't: Vars with non-default returning type
> only appear in the RETURNING clause, so they never show up in WHERE/ON
> clauses.

I pushed the patch after a bit cosmetic tweaks.  I also decided to put
the test cases in returning.sql, which I think is a better place.

Thanks for the report and the patch.

- Richard



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Trying out libarchive for reading user-generated WAL tarballs
Next
From: Alexander Lakhin
Date:
Subject: Re: Adding REPACK [concurrently]