]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix longstanding bug that would sometimes let the planner generate a bad plan
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Oct 2005 20:30:35 +0000 (20:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Oct 2005 20:30:35 +0000 (20:30 +0000)
commit15b46f121f4c08fad4bc1900aa7e6e3370025033
tree57af567d7390b3311bea697405babff1fd76a713
parentea19eb999d7121aba8eefce98051c7cafa376d6d
Fix longstanding bug that would sometimes let the planner generate a bad plan
for an outer join; symptom is bogus error "RIGHT JOIN is only supported with
merge-joinable join conditions".  Problem was that select_mergejoin_clauses
did its tests in the wrong order.  We need to force left join not right join
for a merge join when there are non-mergeable join clauses; but the test for
this only accounted for mergejoinability of the clause operator, and not
whether the left and right Vars were of the proper relations.  Per report
from Jean-Pierre Pelletier.
src/backend/optimizer/path/joinpath.c