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

From: Carlos Moreno <moreno(at)mochima(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: I want more Money (the data type, of course! :-))
Date: 2001-05-24 04:16:31
Message-ID: 3B0C8B1F.7CA5E0C0@mochima.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
--

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Denis A. Doroshenko 2001-05-24 06:09:10 Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory
Previous Message Martijn van Oosterhout 2001-05-24 04:01:42 Re: Estimating costs (was Functional Indices)