From 116d2bba7eeaf25c544bc187e3ad2a8677a9a22c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 19 Jun 2001 22:39:12 +0000 Subject: Add IS UNKNOWN, IS NOT UNKNOWN boolean tests, fix the existing boolean tests to return the correct results per SQL9x when given NULL inputs. Reimplement these tests as well as IS [NOT] NULL to have their own expression node types, instead of depending on special functions. From Joe Conway, with a little help from Tom Lane. --- doc/src/sgml/func.sgml | 17 ++++++++++++++++- doc/src/sgml/syntax.sgml | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index dc646320cb9..00d476edb6f 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -273,6 +273,21 @@ Microsoft Access) to work, but this may be discontinued in a future release. + + + Boolean values can be tested using the constructs + +expression IS TRUE +expression IS NOT TRUE +expression IS FALSE +expression IS NOT FALSE +expression IS UNKNOWN +expression IS NOT UNKNOWN + + These are similar to IS NULL in that they will + always return TRUE or FALSE, never NULL, even when the operand is NULL. + A NULL input is treated as the logical value UNKNOWN. + diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml index 9234e3c26d4..300851235ca 100644 --- a/doc/src/sgml/syntax.sgml +++ b/doc/src/sgml/syntax.sgml @@ -1,5 +1,5 @@ @@ -1060,7 +1060,7 @@ SELECT (5 !) - 6; IS - test for TRUE, FALSE, NULL + test for TRUE, FALSE, UNKNOWN, NULL -- cgit v1.2.3