diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-06-19 22:39:12 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-06-19 22:39:12 +0000 |
commit | 116d2bba7eeaf25c544bc187e3ad2a8677a9a22c (patch) | |
tree | c77a6b20a3acdbb6e25a1fc4a561c0e839ddbb1e /doc/src | |
parent | 8c30aca2ba1a48d38b1206f8559d1dc6b65c5ca7 (diff) | |
download | postgresql-116d2bba7eeaf25c544bc187e3ad2a8677a9a22c.tar.gz postgresql-116d2bba7eeaf25c544bc187e3ad2a8677a9a22c.zip |
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.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 17 | ||||
-rw-r--r-- | doc/src/sgml/syntax.sgml | 4 |
2 files changed, 18 insertions, 3 deletions
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 @@ -<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.61 2001/06/15 21:03:07 tgl Exp $ --> +<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.62 2001/06/19 22:39:08 tgl Exp $ --> <chapter id="functions"> <title>Functions and Operators</title> @@ -273,6 +273,21 @@ <productname>Microsoft Access</productname>) to work, but this may be discontinued in a future release. </para> + + <para> + Boolean values can be tested using the constructs +<synopsis> +<replaceable>expression</replaceable> IS TRUE +<replaceable>expression</replaceable> IS NOT TRUE +<replaceable>expression</replaceable> IS FALSE +<replaceable>expression</replaceable> IS NOT FALSE +<replaceable>expression</replaceable> IS UNKNOWN +<replaceable>expression</replaceable> IS NOT UNKNOWN +</synopsis> + These are similar to <literal>IS NULL</literal> 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. + </para> </sect1> 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 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.42 2001/05/12 22:51:35 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.43 2001/06/19 22:39:08 tgl Exp $ --> <chapter id="sql-syntax"> @@ -1060,7 +1060,7 @@ SELECT (5 !) - 6; <row> <entry><token>IS</token></entry> <entry></entry> - <entry>test for TRUE, FALSE, NULL</entry> + <entry>test for TRUE, FALSE, UNKNOWN, NULL</entry> </row> <row> |