Skip to content

Commit d316f22

Browse files
committed
Add note that COALESCE and NULLIF are shorthand forms of CASE.
1 parent cf00d59 commit d316f22

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/src/sgml/func.sgml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.41 2000/12/14 22:30:56 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.42 2000/12/16 18:33:13 tgl Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -2618,6 +2618,19 @@ SELECT COALESCE(description, short_description, '(none)') ...
26182618
SELECT NULLIF(value, '(none)') ...
26192619
</programlisting>
26202620
</para>
2621+
2622+
<tip>
2623+
<para>
2624+
<function>COALESCE</function> and <function>NULLIF</function> are
2625+
just shorthand for <token>CASE</token> expressions. They are actually
2626+
converted into <token>CASE</token> expressions at a very early stage
2627+
of processing, and subsequent processing thinks it is dealing with
2628+
<token>CASE</token>. Thus an incorrect <function>COALESCE</function> or
2629+
<function>NULLIF</function> usage may draw an error message that
2630+
refers to <token>CASE</token>.
2631+
</para>
2632+
</tip>
2633+
26212634
</sect1>
26222635

26232636

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy