Skip site navigation (1) Skip section navigation (2)

pgsql: Fix longstanding bug that would sometimes let the planner

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix longstanding bug that would sometimes let the planner
Date: 2005-10-25 20:30:46
Message-ID: 20051025203046.E62D5DAEC1@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
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.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/path:
        joinpath.c (r1.82.2.3 -> r1.82.2.4)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinpath.c.diff?r1=1.82.2.3&r2=1.82.2.4)

pgsql-committers by date

Next:From: Tom LaneDate: 2005-10-25 20:30:52
Subject: pgsql: Fix longstanding bug that would sometimes let the planner
Previous:From: Tom LaneDate: 2005-10-25 20:30:37
Subject: pgsql: Fix longstanding bug that would sometimes let the planner

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group