Skip to content
Snippets Groups Projects
Commit d316f222 authored by Tom Lane's avatar Tom Lane
Browse files

Add note that COALESCE and NULLIF are shorthand forms of CASE.

parent cf00d593
No related branches found
No related tags found
No related merge requests found
<!-- $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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment