Constrain duplicate patterns - Mailing list pgsql-novice

From Russell Shaw
Subject Constrain duplicate patterns
Date
Msg-id 401CC1A7.9010508@iprimus.com.au
Whole thread Raw
Responses Re: Constrain duplicate patterns  (Russell Shaw <rjshaw@iprimus.com.au>)
Re: Constrain duplicate patterns  (Michael Glaesemann <grzm@myrealbox.com>)
List 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
...

pgsql-novice by date:

Previous
From: joseph speigle
Date:
Subject: Re: simple update closes connection. why?
Next
From: Russell Shaw
Date:
Subject: Re: Constrain duplicate patterns