Bug or Feature ?

Поиск
Список
Период
Сортировка
От Norbert Meissner
Тема Bug or Feature ?
Дата
Msg-id 392EA8A9.C1307506@syssun11f.rrz.debis.str.daimler-benz.com
обсуждение исходный текст
Ответы Re: Bug or Feature ?
Список 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 по дате отправления:

Предыдущее
От: Nicolas Huillard
Дата:
Сообщение: RE: A few misc. questions.
Следующее
От: Karel Zak
Дата:
Сообщение: Re: Bug or Feature ?