Re: Are globally defined constants possible at all ? - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Are globally defined constants possible at all ?
Date
Msg-id 20020607180447.B30966@mail.libertyrms.com
Whole thread Raw
In response to Re: Are globally defined constants possible at all ?  (Gregory Seidman <gss+pg@cs.brown.edu>)
Responses Re: Are globally defined constants possible at all ?  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-general
On Fri, Jun 07, 2002 at 05:29:27PM -0400, Gregory Seidman wrote:
>
> Er, could you expand on that? Are you suggesting something like this:
>
> CREATE TABLE Foo (
>     KindID int,
>     ...
>     CONSTRAINT fooenum
>     CHECK KindID IN ('SOFTWARE', 'HARDWARE')
> );

Yes.  Except I think you need another set of parentheses

    check("KindID" IN ('SOFTWARE','HARDWARE'))

A

--
----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Re: Are globally defined constants possible at all ?
Next
From: Bruce Momjian
Date:
Subject: Re: Non-linear Performance