Re: BUG #1241: returns different result for the same result with differnt plans. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1241: returns different result for the same result with differnt plans.
Date
Msg-id 24039.1095449550@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1241: returns different result for the same result with differnt plans.  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
List pgsql-bugs
Mark Shewmaker <mark@primefactor.com> writes:
> (BTW, I had sent my first reply and this privately as I'm far from sure
> of myself in these questions, so but feel free to reply to either
> publicly if you want to, or I can re-reply publicly.)

cc'd to pgbugs in case anyone else is wondering the same.

>> On Fri, 2004-09-17 at 15:10, Tom Lane wrote:
>>> Mark Shewmaker <mark@primefactor.com> writes:
>>>> the code would skip processing those batches altogether.  Which is fine...
>>>> unless it's a LEFT JOIN :-(.
>>
>>> Would the same problem then also exist for right outer joins?
>>
>> Yup, if the planner chose to flip it into a left join and apply hash
>> joining (which is altogether likely --- merge join is the only executor
>> join method that supports right join directly, and even then only in
>> restricted cases).

> Okay, so there doesn't need to be any fix for right joins specifically
> then.  (I had seen the "!= JOIN_LEFT" in your patch, which made me
> wonder whether there was a need for something like a "!= (JOIN_LEFT |
> JOIN_RIGHT)" in there.  Obviously I'm pretty clueless as to whether
> that's really necessary of course.)

It's not.  If you look at ExecInitHashJoin you'll see that it rejects
JOIN_RIGHT, should the planner be buggy enough to ask it to do that.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1241: returns different result for the same result with differnt plans.
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1257: add support for 1-byte integer and 4-bit integer