Re: [HACKERS] Re: bug on aggregate function AVG()

Thomas Lockhart <lockhart@alumni.caltech.edu>

From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
To: "Jose' Soares" <jose@sferacarta.com>
Cc: pgsql-hackers@postgreSQL.org
Date: 1998-11-04T06:44:55Z
Lists: pgsql-hackers
> > prova=> select avg(int_2), avg(int_4), avg(int_8) from a;
> The same on SUM():

Sure. For some reason, on most platforms integers are allowed to
overflow in Postgres. Of course, both SUM() and AVG() take a running
sum, and once they overflow you are hosed...

                    - Tom