| От | Tom Lane |
|---|---|
| Тема | Re: Refactoring the Type System |
| Дата | |
| Msg-id | 10464.1289749663@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Refactoring the Type System (Daniel Farina <drfarina@acm.org>) |
| Ответы |
Re: Refactoring the Type System
|
| Список | pgsql-hackers |
Daniel Farina <drfarina@acm.org> writes:
> Here are some weaknesses in the SUM aggregate that run up against the
> type system. Maybe they'll help crystallize some discussion:
> SUM(int2) => int4
> SUM(int4) => int8
> SUM(int8) => numeric
> Some weaknesses:
> SUM, of any precision, assumes that the precision being accumulated
> into (which is also the return-precision) is enough to avoid overflow.
This is not a flaw of the type system, it's just an implementation
choice in the SUM() aggregates. We could easily have chosen wider
accumulation and/or result types.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера