Re: BUG #1241: returns different result for the same result with differnt plans.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Shewmaker <mark(at)primefactor(dot)com>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: BUG #1241: returns different result for the same result with differnt plans.
Date: 2004-09-17 19:32:30
Message-ID: 24039.1095449550@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Mark Shewmaker <mark(at)primefactor(dot)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(at)primefactor(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PostgreSQL Bugs List 2004-09-17 21:40:52 BUG #1257: add support for 1-byte integer and 4-bit integer
Previous Message Tom Lane 2004-09-17 18:38:30 Re: BUG #1241: returns different result for the same result with differnt plans.