"Josh Berkus" <josh(at)agliodbs(dot)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