Re: constraint problem

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: constraint problem
Date: 2005-07-26 02:34:42
Message-ID: 20050726023442.GB37704@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-07-26 03:02:30 Re: pgsql client/server compatibility matrix?
Previous Message Stephan Szabo 2005-07-26 02:29:53 Re: constraint problem