pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: CHECK clause doesn't work with CASE clause
3+ messages / 3 participants
[nested] [flat]
* Re: CHECK clause doesn't work with CASE clause
@ 2002-06-27 13:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2002-06-27 13:44 UTC (permalink / raw)
To: J rg Holetschek <mail2holly@gmx.de>; +Cc: pgsql-sql
"Jörg Holetschek" <mail2holly@gmx.de> writes:
> CASE
> WHEN ((focus <> NULL) AND (epilepsy_class = 'f')) THEN
> TRUE
Try "focus IS NOT NULL".
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: CHECK clause doesn't work with CASE clause
@ 2002-06-27 14:19 ` Richard Huxton <dev@archonet.com>
2 siblings, 0 replies; 3+ messages in thread
From: Richard Huxton @ 2002-06-27 14:19 UTC (permalink / raw)
To: Jörg Holetschek <mail2holly@gmx.de>; pgsql-sql
On Thursday 27 Jun 2002 10:52 am, Jörg Holetschek wrote:
> Hi folks,
>
> I have a problem with a CHECK clause that doesn't seem to work properly.
> WHEN ((focus <> NULL) AND (epilepsy_class = 'f')) THEN
> WHEN ((focus <> NULL) AND (epilepsy_class IN ('g',
> It shouldn't be possible to insert a value into focus when epilepsy_class
> has one of the values 'g' or 'n'. But it is. Can anyone help?
Should that not be "IS NOT NULL"?
- Richard Huxton
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: CHECK clause doesn't work with CASE clause
@ 2002-06-27 15:02 ` Richard Poole <rp@guests.deus.net>
2 siblings, 0 replies; 3+ messages in thread
From: Richard Poole @ 2002-06-27 15:02 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-06-27 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-27 13:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-06-27 14:19 ` Richard Huxton <dev@archonet.com>
2002-06-27 15:02 ` Richard Poole <rp@guests.deus.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox