pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dennis Haney <davh@diku.dk>
To: pgsql-hackers@postgresql.org
Subject: Re: IN joining
Date: Fri, 05 Mar 2004 22:32:03 +0100
Message-ID: <4048F1D3.20405@diku.dk> (raw)
In-Reply-To: <11205.1078520699@sss.pgh.pa.us>
References: <4048B8D6.70401@diku.dk>
	<11205.1078520699@sss.pgh.pa.us>

Tom Lane wrote:

>Dennis Haney <davh@diku.dk> writes:
>  
>
>>Consider this example:
>>SELECT * FROM a,b WHERE a.id = b.id AND (a.id) IN (SELECT c.id FROM c)
>>the possible execution trees are {{a,b}, {c}}, {{a,c},{b}} and the code 
>>seems to also permit {{b,c},{a}}.
>>    
>>
>
>No, it does not --- as you say, that would give wrong answers.  That
>case is eliminated by the tests following this comment:
>
>             * JOIN_IN technique will work if outerrel includes LHS and
>             * innerrel is exactly RHS; conversely JOIN_REVERSE_IN handles
>             * RHS/LHS.
>             *
>             * JOIN_UNIQUE_OUTER will work if outerrel is exactly RHS;
>             * conversely JOIN_UNIQUE_INNER will work if innerrel is
>             * exactly RHS.
>
>Joining {b,c} to {a} does not meet any of those four allowed cases.
>  
>
Exactly my point... So why ever bother creating the {b,c} node which is 
legal by the above definition?


-- 
Dennis
use Inline C => q{void p(char*g){
printf("Just Another %s Hacker\n",g);}};p("Perl");

view thread (7+ messages)  latest in thread

Message-ID: <4048F1D3.20405@diku.dk>
Permalink:  ../4048F1D3.20405@diku.dk/
Also on:    postgresql.org/message-id/4048F1D3.20405@diku.dk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: davh@diku.dk
  Subject: Re: IN joining
  In-Reply-To: <4048F1D3.20405@diku.dk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox