Re: CHECK clause doesn't work with CASE clause

From: Richard Poole <rp(at)guests(dot)deus(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: CHECK clause doesn't work with CASE clause
Date: 2002-06-27 15:02:08
Message-ID: 20020627150207.GA10473@guests.deus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Jun 27, 2002 at 11:52:54AM +0200, J?rg Holetschek wrote:
> Hi folks,
>
> I have a problem with a CHECK clause that doesn't seem to work properly. The

> CASE
> WHEN ((focus <> NULL) AND (epilepsy_class = 'f')) THEN
> TRUE
> WHEN ((focus <> NULL) AND (epilepsy_class IN ('g',
> 'n'))) THEN FALSE
> END),

The condition "focus <> NULL" can't ever come out true. You probably
mean IS NOT NULL.

Richard

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Masaru Sugawara 2002-06-27 15:04:07 Re: 2 Selects 1 is faster, why?
Previous Message Richard Huxton 2002-06-27 14:19:18 Re: CHECK clause doesn't work with CASE clause