| От | Tom Lane |
|---|---|
| Тема | Re: Possible 7.1RC1 bug |
| Дата | |
| Msg-id | 22126.986016790@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Possible 7.1RC1 bug ("Josh Berkus" <josh@agliodbs.com>) |
| Список | pgsql-sql |
"Josh Berkus" <josh@agliodbs.com> writes:
>> This is not a bug. It's a deliberate change in behavior: sum() and
>> avg() on integer datatypes now return numeric, to avoid problems with
>> overflow.
> That could throw off some of my already-written views & functions. Is
> there a setting that can change this back to the "regular" behavior of
> sum(integer) = integer?
Sorry, no. You can coerce the result back to int4 if you care to risk
overflow: "select sum(int4field)::int4" or some such.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера