public inbox for [email protected]  
help / color / mirror / Atom feed
From: Richard Guo <[email protected]>
To: SATYANARAYANA NARLAPURAM <[email protected]>
Cc: Pg Hackers <[email protected]>
Subject: Re: var_is_nonnullable() fails to handle invalid NOT NULL constraints
Date: Wed, 15 Apr 2026 09:51:03 +0900
Message-ID: <CAMbWs48XfOUYPtVmW4ZFD6BfUch9zbWQNVkzNPX+cUe4zGvF=w@mail.gmail.com> (raw)
In-Reply-To: <CAHg+QDcXStdF1m4ZbgT5qnRL_BruLSyBDGgRsibEFutKM2Jqxw@mail.gmail.com>
References: <CAMbWs48ALW=mR0ydQ62dGS-Q+3D7WdDSh=EWDezcKp19xi=TUA@mail.gmail.com>
	<CAHg+QDcXStdF1m4ZbgT5qnRL_BruLSyBDGgRsibEFutKM2Jqxw@mail.gmail.com>

On Sun, Apr 12, 2026 at 6:33 PM SATYANARAYANA NARLAPURAM
<[email protected]> wrote:
> I tested this patch against the current HEAD (155c03ee) and it looks good.
> Build & tests: Applies cleanly, compiles without warnings, all 247 regression tests
> pass including the new subselect test case. Reproduced the bug before the patch
> and verified it is fixed after the patch.

Thanks for testing.

> Looks like it needs to perform table_open/table_close multiple times depending upon
> the number of output columns? I don't see it as a major concern but let others comment.

I don't see it as a major concern either performance-wise.  table_open
here is just a hash lookup and refcount increment, and table_close is
just a refcount decrement.  And the call only happens in NOT IN cases,
and only after sublink_testexpr_is_not_nullable has already returned
true.

So I've committed this patch.

- Richard





view thread (3+ messages)

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: var_is_nonnullable() fails to handle invalid NOT NULL constraints
  In-Reply-To: <CAMbWs48XfOUYPtVmW4ZFD6BfUch9zbWQNVkzNPX+cUe4zGvF=w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox