Kris Jurka написав(ла):
>
> Right, that change would be nice, but it would require a server
> change. The best place to ask about that would be -hackers. Also how
> do you determine the precision of sum(numeric(7,2))?
I suppose the answer is: "As always, by function definition":
9.18. Aggregate Functions
|sum(/expression/)
|bigint for smallint or int arguments, numeric for bigint arguments,
double precision for floating-point arguments, otherwise the same as the
argument data type
So, sum(numeric(7,2)) must be numeric(7,2). If result do not fit, sql
code must be raised.