Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7CA324769B0 for ; Fri, 27 Sep 2002 12:44:46 -0400 (EDT) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by postgresql.org (Postfix) with ESMTP id D8BE7476918 for ; Fri, 27 Sep 2002 12:44:45 -0400 (EDT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 17uyEU-0008S3-0W; Fri, 27 Sep 2002 17:44:51 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id CCE2B179A8; Fri, 27 Sep 2002 17:38:35 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 2F511179A7; Fri, 27 Sep 2002 17:38:35 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: Jean-Luc Lachance Subject: Re: Dublicates pairs in a table. Date: Fri, 27 Sep 2002 17:37:43 +0100 User-Agent: KMail/1.4.3 Cc: pgsql-sql@postgresql.org References: <000201c25d90$87230c10$6500000a@IT000> <200209271354.54187.dev@archonet.com> <3D94849E.4A769993@nsd.ca> In-Reply-To: <3D94849E.4A769993@nsd.ca> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209271737.43262.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/384 X-Sequence-Number: 9661 On Friday 27 Sep 2002 5:17 pm, Jean-Luc Lachance wrote: > What's wrong with > CREATE UNIQUE INDEX foo_both_uniq ON foo(a,b); > ??? Because he specifically wanted values of ('a','b') and ('b','a') to be trea= ted=20 as equivalent (see quote). > > > INSERT INTO test (c1,c2) VALUES('a','c'); > > > INSERT INTO test (c1,c2) VALUES('c','a'); Note Stephen Szabo's observation that I'd missed the obvious need for some= =20 separator so ('a','ab') is different from ('aa','b') - Doh! - Richard Huxton