X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C531ED1DB5B for ; Mon, 8 Mar 2004 16:04:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 37864-04 for ; Mon, 8 Mar 2004 12:04:51 -0400 (AST) Received: from amigos44.diku.dk (amigos44.diku.dk [192.38.109.174]) by svr1.postgresql.org (Postfix) with ESMTP id B2167D1DB35 for ; Mon, 8 Mar 2004 12:04:50 -0400 (AST) Received: from [127.0.0.1] (helo=diku.dk ident=davh) by amigos44.diku.dk with esmtp (Exim 3.36 #1 (Debian)) id 1B0NFJ-0006CH-00; Mon, 08 Mar 2004 17:04:49 +0100 Message-ID: <404C99A0.7050808@diku.dk> Date: Mon, 08 Mar 2004 17:04:48 +0100 From: Dennis Haney Organization: Datalogisk Institut =?ISO-8859-1?Q?K=F8benhavns_Universit?= =?ISO-8859-1?Q?et?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1 X-Accept-Language: da MIME-Version: 1.0 To: Tom Lane Cc: pgsql-hackers@postgresql.org Subject: Re: IN joining References: <4048B8D6.70401@diku.dk> <11205.1078520699@sss.pgh.pa.us> <4048F1D3.20405@diku.dk> <12170.1078528135@sss.pgh.pa.us> <404C7D3C.50908@diku.dk> <4062.1078760645@sss.pgh.pa.us> In-Reply-To: <4062.1078760645@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/257 X-Sequence-Number: 50849 Tom Lane wrote: [SNIP: a repetion of my first post ;) ] >I think it should be > > /* > * If we already joined IN's RHS to anything else in > * either input path, then this join is not constrained (the > * necessary work was done at a lower level). > */ > if (bms_is_subset(ininfo->righthand, rel1->relids) && > !bms_equal(ininfo->righthand, rel1->relids)) > continue; > if (bms_is_subset(ininfo->righthand, rel2->relids) && > !bms_equal(ininfo->righthand, rel2->relids)) > continue; > >Comments? > > It's good. It was pretty much what I was thinking was wrong to begin with. Whether the generated plans are valid is a different issue ;) -- Dennis