Constrain duplicate patterns

From: Russell Shaw <rjshaw(at)iprimus(dot)com(dot)au>
To: pgsql-novice(at)postgresql(dot)org
Subject: Constrain duplicate patterns
Date: 2004-02-01 09:06:47
Message-ID: 401CC1A7.9010508@iprimus.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

Is there a way to make postgresql report an error if when
inserting data, a multiple-column combination is duplicated?

CREATE TABLE parts_vendors (
part_id integer references parts (part_id),
vendor_id integer references vendors (vendor_id),
...
)

part_id vendor_id
------------------
1 3
2 5 <--+
7 9 |
2 5 <--+-- duplicate pattern
...

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Russell Shaw 2004-02-01 09:11:50 Re: Constrain duplicate patterns
Previous Message joseph speigle 2004-02-01 09:06:37 Re: simple update closes connection. why?