Pavel Stehule <[EMAIL PROTECTED]> writes:
+                       /* If any argument is null, then result is null (for 
GREATEST and LEAST)*/

Are you sure about that?  The only reference I could find says that
these functions are not strict in Oracle:

http://download-east.oracle.com/otn_hosted_doc/rdb/pdf/sql_ref_v71_vol1.pdf
on page 2-185:

 The NULL keyword can appear in the list but is ignored. However, not all 
 value expressions can be specified as NULL. That is, a non-NULL value 
 expression must be in the list so that the data type for the expression
 can be determined. 
 The GREATEST and LEAST functions can result in NULL only if at run time 
 all value expressions result in NULL. 

The strict interpretation is mathematically cleaner, no doubt, but
offhand it seems less useful.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to