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 <[email protected]>
Discussion: 
https://postgr.es/m/cambws482_dfhzq079zpp6c8uvmfdz3jj+4k8tvru9g2bw34...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9dce6b5a42bbf97721bd0aeef28688745e77e82f

Modified Files
--------------
src/backend/optimizer/plan/setrefs.c | 29 ++++++++++-------------------
1 file changed, 10 insertions(+), 19 deletions(-)

Reply via email to