Don't include outer join relids in lateral_relids bitmapsets.
Tom Lane <tgl@sss.pgh.pa.us>
Don't include outer join relids in lateral_relids bitmapsets. This avoids an assertion failure when outer joins are rearranged per identity 3. Listing only the baserels from a PlaceHolderVar's ph_lateral set should be enough to ensure that the required values are available when we need to compute the PHV --- it's what we did before inventing nullingrel sets, after all. It's a bit unsatisfying; but with beta2 hard upon us, there's not time to look for an aesthetically cleaner fix. Richard Guo and Tom Lane Discussion: https://postgr.es/m/CAMbWs48Jcw-NvnxT23WiHP324wG44DvzcH1j4hc0Zn+3sR9cfg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/initsplan.c | modified | +13 −3 |
| src/test/regress/expected/join.out | modified | +17 −0 |
| src/test/regress/sql/join.sql | modified | +7 −0 |
Discussion
- ERROR: wrong varnullingrels (b 3) (expected (b)) for Var 2/1 13 messages · 2023-05-30 → 2023-06-19