Hi all,
i found a strange behaviour in Postgresql 7.0 on FreeBSD 4.0
$ createdb foo
$psql foo
foo=# create table number (a_number int);
foo=# insert into number values(1500000000);
foo=# insert into number values(1600000000);
select avg(a_number) from number;
avg
------------
-597483648
This seems like an overflow, but i think that this shouldn't happen on a
database because one can think "ok, there is enough space in the type,
let's average this rows" and gets under some circumstances an average
value that looks like the right value, but it is not. It's just a matter
how many rows one have...
Norbert