Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E72581337B67 for ; Mon, 9 May 2011 22:04:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 40395-04 for ; Tue, 10 May 2011 01:04:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 44BAB1337B81 for ; Mon, 9 May 2011 22:04:49 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id p4A14n024448; Mon, 9 May 2011 21:04:49 -0400 (EDT) From: Bruce Momjian Message-Id: <201105100104.p4A14n024448@momjian.us> Subject: Re: boolean states In-Reply-To: <4DC0FFA5020000250003D243@gw.wicourts.gov> To: Kevin Grittner Date: Mon, 9 May 2011 21:04:49 -0400 (EDT) CC: jaime@2ndquadrant.com, jack@douglastechnology.co.uk, pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1304989489-4194-1_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/41 X-Sequence-Number: 6716 --ELM1304989489-4194-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Kevin Grittner wrote: > Jack Douglas wrote: > > > There are two kinds of people on this earth, those who understand > > boolean arithmatic and those who don't. I'm not one of them. > > Hmmm... From that, I don't know if you do. Which do I record in the > understands_boolean column of the database record for you? Dang, I > knew I should have had *two* flags: known_to_understand_boolean and > known_to_not_understand_boolean. That would have been much simpler > than allowing NULL for UNKNOWN.... Attached patch applied to HEAD and 9.0.X. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + --ELM1304989489-4194-1_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml new file mode 100644 index 657835c..c1a34fb *** a/doc/src/sgml/func.sgml --- b/doc/src/sgml/func.sgml *************** *** 82,89 **** NOT ! SQL uses a three-valued Boolean logic where the null value represents ! unknown. Observe the following truth tables: --- 82,90 ---- NOT ! SQL uses a three-valued logic system with true, ! false, and null, which represents unknown. ! Observe the following truth tables: --ELM1304989489-4194-1_--