From: | Gaetano Mendola <mendola(at)bigfoot(dot)com> |
---|---|
To: | Roger Niederland <2004(at)niederland(dot)com> |
Subject: | Re: constraint expression |
Date: | 2004-08-07 10:19:59 |
Message-ID: | 4114ACCF.6090606@bigfoot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Roger Niederland wrote:
> Hello,
>
> I am having problems adding a simple expression to a table level
> constraint.
> Here is an example of one which postgresql 7.4.3 does not accept.
>
> create table test (a int, b int, c int,
> constraint aname check (((a=0) and (b is not null)) or ((a=1) and (c
> is not null)));
>
> Should this work? It is complaining 'ERROR: syntax error at or near
> ";" at character 126'
Works on 7.4:
regression=# create table test (a int, b int, c int,
regression(# constraint aname check (((a=0) and (b is not null)) or ((a=1) and (c
regression(# is not null))));
CREATE TABLE
you forgot to ")".
Regards
Gaetano Mendola
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff | 2004-08-07 11:30:51 | Re: Out of swap space & memory |
Previous Message | Lincoln Yeoh | 2004-08-07 04:25:02 | Re: Out of swap space & memory |