Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BBA41633411 for ; Mon, 11 Jan 2010 19:27:53 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78546-04 for ; Mon, 11 Jan 2010 23:27:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-gw30.mailanyone.net (smtp-gw30.mailanyone.net [208.70.128.56]) by mail.postgresql.org (Postfix) with ESMTP id 61F746333DE for ; Mon, 11 Jan 2010 19:27:43 -0400 (AST) Received: from mailanyone.net by smtp-gw30.mailanyone.net with esmtpsa (TLSv1:AES128-SHA:128) (MailAnyone extSMTP andy-lists@networkmail.eu) id 1NUTfh-0006lk-8c; Mon, 11 Jan 2010 17:27:41 -0600 Subject: Re: CHECK constraint removing brackets Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Andy Shellam In-Reply-To: <18738.1263240918@sss.pgh.pa.us> Date: Mon, 11 Jan 2010 23:27:35 +0000 Cc: pgsql-sql@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <18738.1263240918@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.1077) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.589 tagged_above=-10 required=5 tests=BAYES_00=-2.599, FH_DATE_PAST_20XX=3.188 X-Spam-Level: X-Archive-Number: 201001/21 X-Sequence-Number: 33557 Hi Tom and Scott, >=20 > I think your real problem is that you're trying to use "=3D NULL" and > "!=3D NULL" where you should say IS NULL or IS NOT NULL. Argh such a school-boy error! This is the first bit of database = programming I've done for about 2 months, and I hadn't switched my C++ = brain off. I know about the <> and !=3D, for some reason !=3D has always made = better sense to me to read, so I tend to write it that way. Cheers, Andy=