Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 5F968477229 for ; Thu, 27 Jun 2002 12:15:20 -0400 (EDT) Mailbox-Line: From dev@archonet.com Thu Jun 27 12:15:20 2002 Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by postgresql.org (Postfix) with ESMTP id 6BEA4476B9A for ; Thu, 27 Jun 2002 11:30:15 -0400 (EDT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 17NaHZ-000MdJ-0Y; Thu, 27 Jun 2002 15:30:02 +0100 Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 1F80F120D5; Thu, 27 Jun 2002 15:19:21 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: "=?iso-8859-1?q?J=F6rg?= Holetschek" , pgsql-sql@postgresql.org Subject: Re: CHECK clause doesn't work with CASE clause Date: Thu, 27 Jun 2002 15:19:18 +0100 User-Agent: KMail/1.4.1 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200206271519.18725.dev@archonet.com> X-Spam-Status: No, hits=-3.5 required=5.0 tests=IN_REP_TO,X_NOT_PRESENT,NO_MX_FOR_FROM version=2.30 X-Spam-Level: X-Archive-Number: 200206/368 X-Sequence-Number: 8333 On Thursday 27 Jun 2002 10:52 am, J=F6rg 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 =3D '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