Skip site navigation (1) Skip section navigation (2)

Re: Dublicates pairs in a table.

From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Dublicates pairs in a table.
Date: 2002-09-27 17:23:49
Message-ID: 3D949425.47649370@nsd.ca (view raw or flat)
Thread:
Lists: pgsql-sql
Oh, sorry I missed that. 

Still if C1 and C2 are interchangable, a rule could force C1 <= C2 and
swap them if necessary.


Richard Huxton wrote:
> 
> 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

In response to

pgsql-sql by date

Next:From: Roland RobertsDate: 2002-09-27 17:29:03
Subject: Re: [SQL] CURRENT_TIMESTAMP
Previous:From: Joe ConwayDate: 2002-09-27 16:44:55
Subject: Re: [SQL] function return multiply rows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group