Re: [BUGS] BUG #4057: SUM returns NULL when given no rows

2008-03-25 Thread Tom Lane
"Reginald Drake" <[EMAIL PROTECTED]> writes: > 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. You might expect that, b

[BUGS] BUG #4057: SUM returns NULL when given no rows

2008-03-25 Thread Reginald Drake
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 SU