"Mario Weilguni" <mario.weilguni@icomedias.com> writes:
> It seems like the planner is pulling the last where condition into the
> second left join, evaluating it in wrong order.
Can you try this on 8.1 branch tip? It sounds suspiciously similar to
an already-fixed issue (see reports from Sebastian B�ck around
mid-November). You haven't provided a complete test case so I really
can't investigate for myself ...
regards, tom lane