The following bug has been logged online:

Bug reference:      4057
Logged by:          Reginald Drake
Email address:      [EMAIL PROTECTED]
PostgreSQL version: 8.2.7
Operating system:   Ubuntu linux
Description:        SUM returns NULL when given no rows
Details: 

Doing something like "SELECT SUM(some_integer_column) FROM some_table WHERE
FALSE" gives me NULL, where I would expect 0. Since COUNT does give a
meaningful value when applied to zero columns, maybe SUM should do the same.

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to