Re: constraint problem - Mailing list pgsql-general

From Michael Fuhr
Subject Re: constraint problem
Date
Msg-id 20050726023442.GB37704@winnie.fuhr.org
Whole thread Raw
In response to constraint problem  (Martín Marqués <martin@bugs.unl.edu.ar>)
List pgsql-general
On Mon, Jul 25, 2005 at 08:28:32PM -0300, Martín Marqués wrote:
> I tried adding this CONSTRAINT to the table definition, but with no luck:
>
>     CONSTRAINT nonuloconfirmado CHECK
>         ((login NOT NULL AND password NOT NULL) OR NOT confirmado)
>
> It gives an error on the first NULL.

Use IS NOT NULL instead of NOT NULL.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: constraint problem
Next
From: Tom Lane
Date:
Subject: Re: pgsql client/server compatibility matrix?