Re: BUG #19412: Wrong query result with not null constraint

Sergey Shinderuk <s.shinderuk@postgrespro.ru>

From: Sergey Shinderuk <s.shinderuk@postgrespro.ru>
To: Richard Guo <guofenglinux@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, David Rowley <dgrowleyml@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2026-02-20T10:54:10Z
Lists: pgsql-bugs
On 2/20/26 12:57, Richard Guo wrote:
> ... and then pushed and back-patched to v16.

Thank you!

> Thank you, Sergey, for the report and the excellent self-contained
> repro query.  This is a great catch.  (I'm curious how you found this
> bug -- was it from a production query or a fuzzing tool?)

The bug was encountered by our customer upgrading to v17 and my 
colleague passed this repro to me.

-- 
Sergey Shinderuk		https://postgrespro.com/



Commits

  1. Fix computation of varnullingrels when translating appendrel Var

  2. Fix IS [NOT] NULL qual optimization for inheritance tables