Re: [HACKERS] 6.5.0 - Overflow bug in AVG( )
| От | Thomas Lockhart |
|---|---|
| Тема | Re: [HACKERS] 6.5.0 - Overflow bug in AVG( ) |
| Дата | |
| Msg-id | 3767AEBA.E7C006B9@alumni.caltech.edu обсуждение исходный текст |
| Ответ на | 6.5.0 - Overflow bug in AVG( ) ("Gene Sokolov" <hook@aktrad.ru>) |
| Ответы |
Re: [HACKERS] 6.5.0 - Overflow bug in AVG( )
|
| Список | pgsql-hackers |
> Float8 accumulator seems to be a good solution if AVG is limited to
> int/float types. I wonder if it could produce system dependency in AVG due
> to rounding errors. Some broader solution should be considered though if you
> want AVG to work on numeric/decimal as well.
The implementation can be specified for each datatype individually, so
that's not a problem. afaik the way numeric/decimal work it would be
fine to use those types as their own accumulators. It's mostly the
int2/int4/int8 types which are the problem, since they silently
overflow (on most machines?).
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
В списке pgsql-hackers по дате отправления: