> One more question, will the sum() on a bigint column cast to float
> happen in floating point?
Yes. You don't really need that though. These days there are only
two flavors of sum(): float8 accumulator (for float8 and float4 inputs)
and numeric accumulator (for everything else). You don't need to worry
about overflow anymore. float8 is faster if you don't mind loss of
precision...
regards, tom lane