unique (a,b)? - Mailing list pgsql-novice

From Knut Suebert
Subject unique (a,b)?
Date
Msg-id 20010504225843.A7396@cascal.vtb
Whole thread Raw
Responses Re: unique (a,b)?  (Knut Suebert <knut.suebert@web.de>)
Re: unique (a,b)?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hello,

I thought that a table-constraint unique (a,b) in a table like

a | b
--+--
1 | 1
2 | 2
3 | 3

would allow an insert of (1,2) as it is an unique combination. That seems to be wrong.

Is there an easy way to check unique combinations in a table definition? Or
do I have to define a special trigger?

Thanks,
Knut

pgsql-novice by date:

Previous
From: "Peter J. Schoenster"
Date:
Subject: Re: input from a file
Next
From: Knut Suebert
Date:
Subject: Re: unique (a,b)?