Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EBDCE1337999 for ; Fri, 29 Apr 2011 04:30:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 93472-04 for ; Fri, 29 Apr 2011 07:29:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smarthost01.mail.zen.net.uk (smarthost01.mail.zen.net.uk [212.23.3.140]) by mail.postgresql.org (Postfix) with ESMTP id C3C45133798E for ; Fri, 29 Apr 2011 04:29:50 -0300 (ADT) Received: from [82.68.43.86] (helo=mail.douglastechnology.co.uk) by smarthost01.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1QFi95-0003MH-Bd; Fri, 29 Apr 2011 07:29:47 +0000 Received: from [192.168.122.2] (www.gfk-charttrack.com [82.43.21.66]) by mail.douglastechnology.co.uk (Postfix) with ESMTPSA id CF20A1264538; Fri, 29 Apr 2011 08:29:46 +0100 (BST) Message-ID: <4DBA68E9.5090302@douglastechnology.co.uk> Date: Fri, 29 Apr 2011 08:29:45 +0100 From: Jack Douglas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Josh Kupershmidt CC: pgsql-docs@postgresql.org Subject: Re: boolean states References: <4DB7D7E3.6010403@douglastechnology.co.uk> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-Smarthost01-IP: [82.68.43.86] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201104/103 X-Sequence-Number: 6674 > I'd vote for just ripping out the: > | A third state, "unknown", is represented by the SQL null value. > > sentence entirely. I see no reason why NULL should be talked about in > particular on the page about boolean data types; there are many data > types, any of which might be NULL. NULL is not unique to boolean, but UNKNOWN is - it would surely be wrong=20 to have no mention of it at all on this page. This is because the=20 boolean type is the only one used to represent truth (or logical)=20 values. One of the comments from the link you provided: > What=92s even more interesting is that for BOOLEAN they invented the=20 > keyword UNKNOWN and the 2003 standard states =93The null value of the=20 > boolean data type is equivalent to the Unknown truth value.=94 So for=20 > BOOLEAN (and only BOOLEAN AFAICT) you=92re supposed to say WHERE=20 > IS [NOT] UNKNOWN. And in the definition of=20 > =93literal=94, which is supposed to =93Specify a non-null value=94, =93= boolean=20 > literal=94 is equated to TRUE, FALSE or UNKNOWN (but the latter is=20 > equivalent to a =93null value=94 a few pages later).