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

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Non-check constraint def for a static list ?
Date: 2009-09-15 15:10:08
Message-ID: 20090915151008.GD5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2009-09-15 15:12:18 Re: Non-check constraint def for a static list ?
Previous Message Gauthier, Dave 2009-09-15 15:01:19 Non-check constraint def for a static list ?