On Tue, Sep 15, 2009 at 08:01:19AM -0700, Gauthier, Dave wrote:
> 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 "che
CHECK( foo IN ('bar1', 'bar2'));
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/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" const
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 askin