Re: boolean states

From: Jack Douglas <jack(at)douglastechnology(dot)co(dot)uk>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: boolean states
Date: 2011-04-29 07:29:45
Message-ID: 4DBA68E9.5090302@douglastechnology.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs


> 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
to have no mention of it at all on this page. This is because the
boolean type is the only one used to represent truth (or logical)
values. One of the comments from the link you provided:

> What’s even more interesting is that for BOOLEAN they invented the
> keyword UNKNOWN and the 2003 standard states “The null value of the
> boolean data type is equivalent to the Unknown truth value.” So for
> BOOLEAN (and only BOOLEAN AFAICT) you’re supposed to say WHERE
> <boolean primary> IS [NOT] UNKNOWN. And in the definition of
> “literal”, which is supposed to “Specify a non-null value”, “boolean
> literal” is equated to TRUE, FALSE or UNKNOWN (but the latter is
> equivalent to a “null value” a few pages later).

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Greg Smith 2011-04-30 03:46:28 Documentation tweaks: ALTER USER, statement-based middleware
Previous Message Josh Kupershmidt 2011-04-29 01:20:39 Re: boolean states