Non-check constraint def for a static list ?

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Non-check constraint def for a static list ?
Date: 2009-09-15 15:01:19
Message-ID: 482E80323A35A54498B8B70FF2B8798004189C0D8F@azsmsx504.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi:

How could I define a constraint on a colum who's value I want to restrict to a static list of strings? For example, a column colled "gender" which cannot be NULL and must be either 'M' or 'F'. I can do it with a "check" constraint, but I can't defer those constraints (the reason I'm asking for a non-check soln)

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-09-15 15:10:08 Re: Non-check constraint def for a static list ?
Previous Message Inigo Barandiaran 2009-09-15 13:08:37 Re: Regarding initdb & pg_ctl