Shouldn't the sum() and "+" operators behave the same?
No, see SQL99, Section 6.16, General Rules 1.b:
"Otherwise, let TX be the single-column table that is the result of applying the <value expression> to each row of T and eliminating null values. If one or more null values are eliminated, then a completion condition is raised: warning — null value eliminated in set function."
I've never seen a database that emits the required warning, though.
Joe
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html