I wrote:
> Christian Schröder <cs@deriva.de> writes:
>> This is the query:
>> select isin from ts_frontend.attachment_isins full OUTER JOIN
>> ts_frontend.rec_isins using (attachment,isin) WHERE attachment=2698120
>> GROUP BY isin limit 1000;
> Hmm. It seems 8.3 is failing to push the attachment=2698120 condition
> down to the input relations. Not sure why. All that code got massively
> rewritten in 8.3, but I thought it still understood about pushing
> equalities through a full join ...
On further review, this did work in 8.3 when released. I think it got
broken here:
http://archives.postgresql.org/pgsql-committers/2008-06/msg00336.php
because that change is preventing the "mergedvar = constant" clause from
being seen as an equivalence, when it should be seen as one. Need to
think about a tighter fix for the bug report that prompted that change.
regards, tom lane