Re: Dublicates pairs in a table. - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Dublicates pairs in a table.
Date
Msg-id 200209271737.43262.dev@archonet.com
Whole thread Raw
In response to Re: Dublicates pairs in a table.  (Jean-Luc Lachance <jllachan@nsd.ca>)
List pgsql-sql
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 treated
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
separator so ('a','ab') is different from ('aa','b') - Doh!

- Richard Huxton




pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Null not equal to '' (empty)
Next
From: Joe Conway
Date:
Subject: Re: function return multiply rows