X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1E332D1B4E1 for ; Sun, 28 Sep 2003 19:04:52 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 03173-02 for ; Sun, 28 Sep 2003 16:04:43 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 9EF2CD1B522 for ; Sun, 28 Sep 2003 16:04:35 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 515FE35223; Sun, 28 Sep 2003 12:04:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 4FC2D3520A; Sun, 28 Sep 2003 12:04:37 -0700 (PDT) Date: Sun, 28 Sep 2003 12:04:37 -0700 (PDT) From: Stephan Szabo To: Bruce Momjian Cc: Tom Lane , Christopher Kings-Lynne , Peter Childs , PostgreSQL-development Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta) In-Reply-To: <200309281855.h8SIt3a26891@candle.pha.pa.us> Message-ID: <20030928120357.Q74070@megazone.bigpanda.com> References: <200309281855.h8SIt3a26891@candle.pha.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/1477 X-Sequence-Number: 44489 On Sun, 28 Sep 2003, Bruce Momjian wrote: > Stephan Szabo wrote: > > Hmm, my initial testing showed that it really was a little slower > > than a more complicated one with NOT EXISTS so I'd abandoned it. How does > > it fare for you compared to: > > select f1, f2 from fk where not exists (select 1 from pk where pk.f1=fk.f1 > > and pk.f2=pk.f2) where fk.f1 is not null and fk.f2 is not null; > > > > I believe the above is the appropriate not exists form for match > > unspecified. > > > > I've actually got code (that no longer cleanly applies, but...) that uses > > the single query version with NOT EXISTS (which could be easily changed to > > either of the other forms) and was planning to put it together for a patch > > when 7.5 devel started because I figured it wasn't precisely a bug and > > wouldn't get accepted for 7.4. > > I am a little lost on this point myself --- are we talking 7.4 or 7.5 > for this change? I'd thought 7.5, but I now see that it's on the 7.4 open items list.