Re: boolean bugs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: boolean bugs
Date: 2001-01-06 22:56:18
Message-ID: 28105.978821778@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Robert B. Easter" <reaster(at)comptechnews(dot)com> writes:
> The IS operator is supposed to return only TRUE or FALSE, never NULL. See
> ISO/IEC 9075-2:1999 6.30 <boolean value expression>

Yeah, we do not implement IS TRUE, IS FALSE, etc per spec. IS [NOT] NULL
is the only one of the group that works per-spec; the others all
erroneously produce NULL for null input, and IS UNKNOWN isn't there at all.

I've had that on my to-do list for awhile, but it's pretty low priority.

> pgcvs=# select (nullfield = 'willbenull') is (false is false) from nulltest;
> ERROR: parser: parse error at or near "("

> The IS operator has a problem if right side is in parenthesis.

I'd be interested to know how you derive that expression from the spec.
By my reading of the grammar, IS is supposed to be followed by one or
two literal keywords, not an expression.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert B. Easter 2001-01-06 23:30:03 Re: boolean bugs
Previous Message Robert B. Easter 2001-01-06 22:31:25 boolean bugs