Kyle <kyle(at)actarg(dot)com> writes:
> It appears that sum(int4) returns type numeric. Shouldn't it return
> int4?
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.
regards, tom lane