Re: ERROR: failed to build any 4-way joins - Mailing list pgsql-bugs

From Tom Lane
Subject Re: ERROR: failed to build any 4-way joins
Date
Msg-id 7310.1165952331@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: failed to build any 4-way joins  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: ERROR: failed to build any 4-way joins
List pgsql-bugs
Teodor Sigaev <teodor@sigaev.ru> writes:
> Test suite (as simple as I can produce):

Mmm, sweet :-(.  There is only one legal way to form the outer join, but
make_rels_by_joins() doesn't try it because have_relevant_joinclause()
says there is no relevant joinclause ... as indeed there is not, the
"true = true" thing having been optimized away.  I guess we need a hack
to treat empty outer join conditions specially.

> Sorry, versions are 8.2 & 8.3. 8.1 works well

Right, not a problem before 8.2 because outer join order was driven by
the syntax instead of by searching for a good join order.  Also, you
need at least two base relations on each side of the outer join, else
the "last ditch" case in make_rels_by_joins() finds the join.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: postgresql installation on centOS not working
Next
From: Devrim GUNDUZ
Date:
Subject: Re: postgresql installation on centOS not working