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 21:37:27
Message-ID: 25101.1165959447@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> I guess we need a hack
> to treat empty outer join conditions specially.

Actually, it can happen with non-empty join conditions too, if the join
condition doesn't mention the outer side; for instance, using your
example

explain SELECT * from fooview fv1
LEFT OUTER JOIN fooview fv2 on fv2.a_for_max_b < 10;

So my original thoughts of a narrow special case for "OUTER JOIN ON TRUE"
went up in smoke, and I ended up just having have_relevant_joinclause()
troll for relevant outer joins all the time. This probably isn't going
to cost enough planning time to matter, anyway.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2006-12-13 09:46:06 Re: postgresql installation on centOS not working
Previous Message Bruce Momjian 2006-12-12 21:31:12 Re: BUG #2816: Logfile difference in timestamp between