Re: Non-check constraint def for a static list ? - Mailing list pgsql-general

From Sam Mason
Subject Re: Non-check constraint def for a static list ?
Date
Msg-id 20090915151008.GD5407@samason.me.uk
Whole thread Raw
In response to Non-check constraint def for a static list ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
On Tue, Sep 15, 2009 at 08:01:19AM -0700, Gauthier, Dave wrote:
> 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)

If this is to do with your similar questions from earlier; at what point
does the data become valid and why don't you just delay putting the data
into the "real" table at then.

--
  Sam  http://samason.me.uk/

pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: Non-check constraint def for a static list ?
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Non-check constraint def for a static list ?