Re: Constrain duplicate patterns

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Constrain duplicate patterns
Дата
Msg-id 13B30164-5498-11D8-AB38-000A95C88220@myrealbox.com
обсуждение исходный текст
Ответ на Constrain duplicate patterns  (Russell Shaw <rjshaw@iprimus.com.au>)
Ответы Re: Constrain duplicate patterns  (Russell Shaw <rjshaw@iprimus.com.au>)
Список pgsql-novice
On Feb 1, 2004, at 6:06 PM, Russell Shaw wrote:

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

I believe you're looking for UNIQUE(part_id, vendor_id), if you want to
prevent this from happening. If you just want it to report an error,
but allow the insert/update anyway, maybe a trigger? Not sure about
that though.

Hope this helps.

Michael Glaesemann
grzm myrealbox com


В списке pgsql-novice по дате отправления:

Предыдущее
От: Russell Shaw
Дата:
Сообщение: Re: Constrain duplicate patterns
Следующее
От: joseph speigle
Дата:
Сообщение: Re: Constrain duplicate patterns