unique (a,b)?

From: Knut Suebert <knut(dot)suebert(at)web(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: unique (a,b)?
Date: 2001-05-04 20:58:43
Message-ID: 20010504225843.A7396@cascal.vtb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Knut Suebert 2001-05-04 21:01:59 Re: unique (a,b)?
Previous Message rbird 2001-05-04 20:49:51 Install of postgresql