|
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 $ --> |
2 | 2 |
|
3 | 3 | <chapter id="functions">
|
4 | 4 | <title>Functions and Operators</title>
|
@@ -2618,6 +2618,19 @@ SELECT COALESCE(description, short_description, '(none)') ...
|
2618 | 2618 | SELECT NULLIF(value, '(none)') ...
|
2619 | 2619 | </programlisting>
|
2620 | 2620 | </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 | + |
2621 | 2634 | </sect1>
|
2622 | 2635 |
|
2623 | 2636 |
|
|