Further tighten nullingrel marking rules in build_joinrel_tlist().
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Feb 2023 19:45:36 +0000 (14:45 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Feb 2023 19:45:36 +0000 (14:45 -0500)
commitd1c9c864fc042412e9b674d79a0e70972053ce15
tree0fa342f9b8e01d48c38156771e590313e80738b2
parent798c0176342150c8fe1404b0007b299db2e73ce0
Further tighten nullingrel marking rules in build_joinrel_tlist().

The code I added in fee7b77b9 could misbehave if commute_above_r
contains multiple relids.  While adding too many relids here is
probably harmless (pre-fee7b77b9, we did it all the time), it's
not very expensive to be accurate: we just have to intersect
commute_above_r with the join's relids.

Discussion: https://postgr.es/m/17781-c0405c8b3cd5e072@postgresql.org
src/backend/optimizer/util/relnode.c