Re: ERROR: failed to build any 4-way joins

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: ERROR: failed to build any 4-way joins
Date: 2006-12-12 19:38:51
Message-ID: 7310.1165952331@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Teodor Sigaev <teodor(at)sigaev(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Devrim GUNDUZ 2006-12-12 19:56:55 Re: postgresql installation on centOS not working
Previous Message Heikki Linnakangas 2006-12-12 19:05:12 Re: postgresql installation on centOS not working