• T
    Fix longstanding bug that would sometimes let the planner generate a bad plan · ddb4015e
    Tom Lane 提交于
    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.
    ddb4015e
joinpath.c 26.6 KB