aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/network_gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-04-08 16:09:07 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-04-08 16:09:07 -0400
commit2f78974e29bde06c265dec1332a8cc4c06bcda97 (patch)
treec561e86120ca8229e46b6b05165e77e5329227ee /src/backend/utils/adt/network_gist.c
parent9ec582b64d69fcd103e8a3bc13a621ca376db921 (diff)
downloadpostgresql-2f78974e29bde06c265dec1332a8cc4c06bcda97.tar.gz
postgresql-2f78974e29bde06c265dec1332a8cc4c06bcda97.zip
Fix improper interaction of FULL JOINs with lateral references.
join_is_legal() needs to reject forming certain outer joins in cases where that would lead the planner down a blind alley. However, it mistakenly supposed that the way to handle full joins was to treat them as applying the same constraints as for left joins, only to both sides. That doesn't work, as shown in bug #15741 from Anthony Skorski: given a lateral reference out of a join that's fully enclosed by a full join, the code would fail to believe that any join ordering is legal, resulting in errors like "failed to build any N-way joins". However, we don't really need to consider full joins at all for this purpose, because we effectively force them to be evaluated in syntactic order, and that order is always legal for lateral references. Hence, get rid of this broken logic for full joins and just ignore them instead. This seems to have been an oversight in commit 7e19db0c0. Back-patch to all supported branches, as that was. Discussion: https://postgr.es/m/15741-276f1f464b3f40eb@postgresql.org
Diffstat (limited to 'src/backend/utils/adt/network_gist.c')
0 files changed, 0 insertions, 0 deletions