On Fri, 9 May 2008, dombrd@gmail.com wrote:
> I realize I'm not going to get you to change back to returning -1 for
> the scale and precision, because a lot of users would be affected by
> that. However, I am wondering if there is a way we could get the
> actual precision and scale returned for an aggregate sum, and other
> aggregate functions as well.
>
> I would think it should be returning a scale and precision if the
> argument column has scale and precision specified, such as in the
> NUMERIC(7,2) example I previously showed. It seems wrong to return 0
> in this case.
>
> I am guessing the postgresql server code would need to be changed for
> that to work though. Maybe I should be suggesting this change on a
> different list?
>
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))?
Kris Jurka