Re: Possible 7.1RC1 bug

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: possible row locking bug in 7.0.3 & 7.1
Следующее
От: Sharmad Naik
Дата:
Сообщение: Library Management System