Re: Pbm with aggregates on empty output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jean-Francois Rabasse <rabasse(at)lra(dot)ens(dot)fr>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Pbm with aggregates on empty output
Date: 2001-03-08 00:42:40
Message-ID: 22525.984012160@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jean-Francois Rabasse <rabasse(at)lra(dot)ens(dot)fr> writes:
> => select sum(1) from thetable where thevalue > 10000;
> pqReadData() -- backend closed the channel unexpectedly.

Strange ... but rather than spend any time debugging 6.5.3,
I'd suggest updating to 7.0.3. We've fixed an awful lot of bugs
since then.

BTW, what you will actually get is a NULL result, not a zero result.
Don't blame me, blame SQL92, because that's what it specifies for SUM
of no rows :-(

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-03-08 02:07:04 Re: seq scan on a table whereas an index exist
Previous Message Tom Lane 2001-03-08 00:38:30 Re: COBOL