Mike Mascari <mascarm@mascari.com> writes:
> Under the snapshot from yesterday:
> ---------------------------------
> template1=# create function crap(int4) returns int4
> as 'select sum(key) from test' language 'sql';
> ERROR: return type mismatch in function: declared to return
> int4, returns numeric
I changed sum() on integer types to return numeric as a way of
avoiding overflow. Also avg() on integers now returns numeric
so that you can get some fractional precision. If you think this
was a bad idea, there's still time to debate it ... but we've had
repeated complaints about both of those issues.
regards, tom lane