Thread

  1. Use exact nullingrels matches for NestLoopParams

    Richard Guo <guofenglinux@gmail.com> — 2025-11-11T06:58:31Z

    As noted in the commit message of 66e9df9f6, we can now safely use
    NRM_EQUAL to process NestLoopParams in setrefs.c.  This is because
    identify_current_nestloop_params now ensures that 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.
    
    Here is a patch that makes that change.  It also removes the
    NRM_SUBSET enum value, along with all remaining checks for it, since
    it is no longer used.
    
    (I'm wondering if we have a way to identify the nullingrels added by
    an outer join when fixing up its targetlist and qpqual.  If so, we
    might be able to switch to exact nullingrels matches for them and
    thereby get rid of NRM_SUPERSET too.)
    
    - Richard