Re: Prove a NOT IN's left-hand expressions non-nullable from quals

From: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>
To: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Prove a NOT IN's left-hand expressions non-nullable from quals
Date: 2026-07-29 12:47:49
Message-ID: CAGjGUALeU18OLhKRzhew0+oGK1tqe7pDBS9nHZgcYxH-PhdGZQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ayush

> if (nonnullable_quals != NIL && IsA(expr, Var) &&
> > ((Var *) expr)->varlevelsup == 0)
>
I think the additional varlevelsup == 0 check is correct.
find_nonnullable_vars() only records level-zero Vars, and the
multibitmapset identifies them using only varno and varattno.

Thanks

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2026-07-29 12:55:02 Re: pg_rewind does not rewind diverging timelines
Previous Message Daniel Gustafsson 2026-07-29 12:24:25 Re: datachecksums: handle invalid and dropped databases during enable