I wrote:
> This didn't matter a whole lot back when the planner couldn't reorder
> outer joins, but now that it can, it's more important that the estimates
> be accurate.
> I'm not sure if this is feasible to fix before 8.2, but I'll take a
> look.
Actually, the changes were far more localized than I first feared.
Please apply the attached patch to your copy and see what you get for
your problem query.
regards, tom lane