aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-16 18:33:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-16 18:33:13 +0000
commitd316f2226738d91e00461f49f6bef16ae178954c (patch)
tree11f5be5debe90eae0893044792a9da236230a365
parentcf00d59335f2f695b22628239ffe1f99f7db07a7 (diff)
downloadpostgresql-d316f2226738d91e00461f49f6bef16ae178954c.tar.gz
postgresql-d316f2226738d91e00461f49f6bef16ae178954c.zip
Add note that COALESCE and NULLIF are shorthand forms of CASE.
-rw-r--r--doc/src/sgml/func.sgml15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 5b3012625ea..48bdb2a5e1c 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.41 2000/12/14 22:30:56 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.42 2000/12/16 18:33:13 tgl Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
@@ -2618,6 +2618,19 @@ SELECT COALESCE(description, short_description, '(none)') ...
SELECT NULLIF(value, '(none)') ...
</programlisting>
</para>
+
+ <tip>
+ <para>
+ <function>COALESCE</function> and <function>NULLIF</function> are
+ just shorthand for <token>CASE</token> expressions. They are actually
+ converted into <token>CASE</token> expressions at a very early stage
+ of processing, and subsequent processing thinks it is dealing with
+ <token>CASE</token>. Thus an incorrect <function>COALESCE</function> or
+ <function>NULLIF</function> usage may draw an error message that
+ refers to <token>CASE</token>.
+ </para>
+ </tip>
+
</sect1>