Re: Preventing duplicate records according to several fields - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Preventing duplicate records according to several fields
Date
Msg-id 279ED533-4E9D-44E3-8B21-3EC535AA31DB@myrealbox.com
Whole thread Raw
In response to Preventing duplicate records according to several fields  (CSN <cool_screen_name90001@yahoo.com>)
List pgsql-general
On Sep 21, 2005, at 10:34 AM, CSN wrote:

> id, title, yield, directions
>
> and would like to prevent duplicate records from being
> added (i.e. according to the title, yield, and
> directions fields).

<snip />

> - Create a unique index across the title, yield, and
> directions fields.

This scenario is exactly what the UNIQUE contraint is for.

Michael Glaesemann
grzm myrealbox com



pgsql-general by date:

Previous
From: CSN
Date:
Subject: Preventing duplicate records according to several fields
Next
From: suresh ramasamy
Date:
Subject: Re: help me pls