Re: I want more Money (the data type, of course! :-)) - Mailing list pgsql-general

From Carlos Moreno
Subject Re: I want more Money (the data type, of course! :-))
Date
Msg-id 3B0C8B1F.7CA5E0C0@mochima.com
Whole thread Raw
In response to Re: I want more Money (the data type, of course! :-))  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Re: I want more Money (the data type, of course! :-))  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
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
--

pgsql-general by date:

Previous
From: "John"
Date:
Subject: Re: Re: perl vs php for postgresql
Next
From: hicham bouzdad
Date:
Subject: transactions on Postgresql