Re: [QUESTIONS] Error on PostgreSQL agregate SUM() function??

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: [QUESTIONS] Error on PostgreSQL agregate SUM() function??
Дата
Msg-id 34E329E8.7DD683E9@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: [QUESTIONS] Error on PostgreSQL agregate SUM() function??  (sferac@bo.nettuno.it)
Ответы Re: [QUESTIONS] Error on PostgreSQL agregate SUM() function??
Список pgsql-hackers
> > > PostgreSQL SUMs population column given -1523690296 (overflow)
> > > While SOLID and MySQL gives 2771277000.
> > > Is it correct to have an overflow with SUM() function ?
> > Do you know what technique Solid and/or MySQL use to allow an integer summation to
> > exceed the range of a signed 32-bit integer? Do they do summations using floating
> > point? Let us know...
>
> To have overflows isn't a merit but a lack.
> MySQL and SOLID don't use overflow even on SUM(float):

Yes, I understood your point. However, we need a description of an alternative
implementation to evaluate; can you describe the implementation of Solid or MySQL for
the sum() operator wrt integers?? Does it use a float8 as the accumulator?

> ... PostgreSQL isn't coherent;
> it gives an overflow message on sum(float)
> and nothing when overflow on sum(int) or sum(smallint).

Yes, on some or all platforms Postgres allows silent overflows on integer types. I'm
not certain about the behavior for all platforms. Is the "float" type on MySQL and
Solid 4 bytes or eight? If eight, how do they "allow" overflows??

                                                           - Tom


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

Предыдущее
От: "Kenji T. Hollis"
Дата:
Сообщение: Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha