constraint expression

From: 2004(at)niederland(dot)com (Roger Niederland)
To: pgsql-general(at)postgresql(dot)org
Subject: constraint expression
Date: 2004-08-07 01:14:49
Message-ID: 89683d03.0408061714.4ed01320@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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'

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Bartz 2004-08-07 02:10:33 Re: Out of swap space & memory
Previous Message Jerry LeVan 2004-08-06 23:46:13 Re: Lost my blobs and can't restore.