Unique cosntraint based on contents of a field?

From: Warren Bell <warrenbell2(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Unique cosntraint based on contents of a field?
Date: 2010-04-08 02:30:12
Message-ID: 4BBD3FB4.3010206@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a way to create a unique constraint based on the content of a
field? For instance, say you have an integer field where you only want
one record with the number 1 in that field but there can be many records
with say the number 2 or any other single number in that field.

--
Thanks,

Warren Bell

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Casanova 2010-04-08 03:48:36 Re: Unique cosntraint based on contents of a field?
Previous Message Andy Colson 2010-04-08 01:38:32 Re: Postgres 9 alpha 5 revised, stored proc