Re: BUG #19412: Wrong query result with not null constraint
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Sergey Shinderuk <s.shinderuk@postgrespro.ru>
Cc: pgsql-bugs@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>, David Rowley <dgrowleyml@gmail.com>
Date: 2026-02-19T01:49:44Z
Lists: pgsql-bugs
On Wed, Feb 18, 2026 at 9:03 PM Sergey Shinderuk <s.shinderuk@postgrespro.ru> wrote: > I'm not familiar with the code, just curios. There is a long comment > above saying "You might think we need to adjust var->varnullingrels, but > that shouldn't need any changes." Doesn't it need an update? No, I don't think we need to update it. That comment explains why varnullingrels do not require translation (since they are outer join relids, not baserel relids). It's unrelated to what this patch does, which is about propagating varnullingrels into the translated Var. - Richard
Commits
-
Fix computation of varnullingrels when translating appendrel Var
- ec20a45528bf 16.13 landed
- bcaf1b5101c4 17.9 landed
- ed57c207c397 18.3 landed
- 691977d37037 19 (unreleased) landed
-
Fix IS [NOT] NULL qual optimization for inheritance tables
- 3af7040985b6 17.0 cited