Index: doc/src/sgml/func.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v retrieving revision 1.295 diff -c -c -r1.295 func.sgml *** doc/src/sgml/func.sgml 19 Nov 2005 19:44:54 -0000 1.295 --- doc/src/sgml/func.sgml 28 Nov 2005 23:17:42 -0000 *************** *** 7227,7232 **** --- 7227,7240 ---- COALESCE + + NVL + + + + IFNULL + + COALESCE(value , ...) *************** *** 7234,7242 **** The COALESCE function returns the first of its arguments that is not null. Null is returned only if all arguments ! are null. This is often useful to substitute a ! default value for null values when data is retrieved for display, ! for example: SELECT COALESCE(description, short_description, '(none)') ... --- 7242,7249 ---- The COALESCE function returns the first of its arguments that is not null. Null is returned only if all arguments ! are null. It is often used to substitute a default value for ! null values when data is retrieved for display, for example: SELECT COALESCE(description, short_description, '(none)') ... *************** *** 7246,7252 **** Like a CASE expression, COALESCE will not evaluate arguments that are not needed to determine the result; that is, arguments to the right of the first non-null argument are ! not evaluated. --- 7253,7261 ---- Like a CASE expression, COALESCE will not evaluate arguments that are not needed to determine the result; that is, arguments to the right of the first non-null argument are ! not evaluated. This SQL-standard function provides capabilities similar ! to NVL and IFNULL, which are used in some other ! database systems. *************** *** 7262,7277 **** ! The NULLIF function returns a null value if and only ! if value1 and ! value2 are equal. Otherwise it returns ! value1. This can be used to perform the ! inverse operation of the COALESCE example ! given above: SELECT NULLIF(value, '(none)') ... --- 7271,7289 ---- ! The NULLIF function returns a null value if ! value1 and value2 ! are equal; otherwise it returns value1. ! This can be used to perform the inverse operation of the ! COALESCE example given above: SELECT NULLIF(value, '(none)') ... + + If value1 is (none), return a null, + otherwise return value1. +