Re: Aggregate Function (AVG) not calculated correctly

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Aggregate Function (AVG) not calculated correctly
Дата
Msg-id 14495.976030278@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Aggregate Function (AVG) not calculated correctly  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
pgsql-bugs@postgresql.org writes:
> I have included all code needed to prove the bug,

No, you haven't: where are the table declarations?

But I'll take a guess anyway: you declared "distance" as int2, didn't
you?  AVG(int2) currently uses an int2 accumulator, and you're suffering
overflow.  Try "AVG(distance::float8)" instead.

We've changed AVG() to use a numeric accumulator for 7.1, but that
won't help you today.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Aggregate Function (AVG) not calculated correctly
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: createlang requires entering password 4 times