Bug or Feature ?

From: Norbert Meissner <norbert(dot)meissner(at)str(dot)daimler-benz(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgreSQL(dot)org>
Subject: Bug or Feature ?
Date: 2000-05-26 16:39:05
Message-ID: 392EA8A9.C1307506@syssun11f.rrz.debis.str.daimler-benz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Karel Zak 2000-05-26 16:40:42 Re: Bug or Feature ?
Previous Message Peter Eisentraut 2000-05-26 14:15:31 Re: A few misc. questions.