Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Support RIGHT and FULL OUTER JOIN in hash joins.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Support RIGHT and FULL OUTER JOIN in hash joins.
Date: 2011-05-24 14:44:57
Message-ID: 6191.1306248297@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committers
Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
> It looks to me like mergejoin_allowed should be initialized to false.
> If enable_mergejoin is off and jointype != JOIN_FULL then mergejoin is
> not allowed, isn't it? Sorry for noise if it's only my confusing.

No, the code is correct as-is: we need the flag to be set true by
default, because the way that the function is using it, we'll also skip
some nestloop possibilities when it's false.  Note the comment for step
2.

It could be that a different name for that flag variable would be a
better idea, but neither Robert nor I could come up with a better one.

			regards, tom lane

In response to

Responses

pgsql-committers by date

Next:From: Tom LaneDate: 2011-05-24 18:22:31
Subject: pgsql: Avoid uninitialized bits in the result of QTN2QT().
Previous:From: Hitoshi HaradaDate: 2011-05-24 09:59:22
Subject: Re: pgsql: Support RIGHT and FULL OUTER JOIN in hash joins.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group