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 ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster