Bug or Feature ? - Mailing list pgsql-admin

From Norbert Meissner
Subject Bug or Feature ?
Date
Msg-id 392EA8A9.C1307506@syssun11f.rrz.debis.str.daimler-benz.com
Whole thread Raw
Responses Re: Bug or Feature ?
List pgsql-admin
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


pgsql-admin by date:

Previous
From: Nicolas Huillard
Date:
Subject: RE: A few misc. questions.
Next
From: Karel Zak
Date:
Subject: Re: Bug or Feature ?