• Tom Lane's avatar
    Simplify LATERAL-related calculations within add_paths_to_joinrel(). · edca44b1
    Tom Lane authored
    While convincing myself that commit 7e19db0c would solve both of
    the problems recently reported by Andreas Seltenreich, I realized that
    add_paths_to_joinrel's handling of LATERAL restrictions could be made
    noticeably simpler and faster if we were to retain the minimum possible
    parameterization for each joinrel (that is, the set of relids supplying
    unsatisfied lateral references in it).  We already retain that for
    baserels, in RelOptInfo.lateral_relids, so we can use that field for
    joinrels too.
    
    I re-pgindent'd the files touched here, which affects some unrelated
    comments.
    
    This is, I believe, just a minor optimization not a bug fix, so no
    back-patch.
    edca44b1
joinpath.c 46.7 KB