Stephan Szabo wrote:
> 
> Use numeric with appropriate precision information.

I'm assuming that when I use numeric specifying the 
number of decimals, there is no rounding error in 
the arithmetic and storage?  (well, other than 
rounding on the decimals beyond the ones specified -- 
e.g., if I say numeric, 2 decimals, there will be 
rounding error only in the 3rd decimal and after 
the 3rd decimal?) 

If so, then it sounds better than using an 8-byte 
integer to keep the pennies, given that it is more 
a what-you-get-is-what-you-get thing than storing 
the pennies, which is really a what-you-get-is-not-
what-you-get-until-you-divide-it-by-100  ;-) 

Thanks!

Carlos
--

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to