]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use exact nullingrels matches for NestLoopParams
authorRichard Guo <rguo@postgresql.org>
Wed, 8 Jul 2026 03:00:36 +0000 (12:00 +0900)
committerRichard Guo <rguo@postgresql.org>
Wed, 8 Jul 2026 03:00:36 +0000 (12:00 +0900)
commit9dce6b5a42bbf97721bd0aeef28688745e77e82f
treeb9ae5e540ece498601cf6cd01ed15d06885e3d63
parente6e08dc5543485c7f4851551e67a99b0cf8027eb
Use exact nullingrels matches for NestLoopParams

We have been using NRM_SUBSET to process NestLoopParams in setrefs.c,
because Vars or PHVs in NestLoopParam expressions may previously have
had nullingrels that were just subsets of those in the Vars or PHVs
actually available from the outer side.

Since 66e9df9f6, identify_current_nestloop_params ensures that any
Vars or PHVs seen in a NestLoopParam expression have nullingrels that
include exactly the outer-join relids that appear in the outer side's
output and can null the respective Var or PHV.  As noted in that
commit's message, we can now safely use NRM_EQUAL to process
NestLoopParams in setrefs.c.

This patch makes that change and removes the definition of NRM_SUBSET,
along with all remaining checks for it, since it is no longer used.

Author: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAMbWs482_DFHzQ079ZPp6c8UvmFdz3Jj+4K8tVRu9g2Bw34NPA@mail.gmail.com
src/backend/optimizer/plan/setrefs.c