Re: Money data type in PostgreSQL? - Mailing list pgsql-general

From Greg Stark
Subject Re: Money data type in PostgreSQL?
Date
Msg-id 87fzg26i4d.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: Money data type in PostgreSQL?  ("Claudio Lapidus" <clapidus@hotmail.com>)
List pgsql-general
"Claudio Lapidus" <clapidus@hotmail.com> writes:

> With regard to precision, it is common in certain applications the need to
> handle very small amounts, especially when used as factors of a larger
> calculation. I've even seen once some rates defined in hundredths of cents!

Normally there's nothing smaller than a tenth of a cent in US currency. It's
called a "mill". (or "mil"? I forget.). Of course you have to multiply
currency amounts by floating point numbers like interest rates or such, and
that will produce strange numbers but they'll always be rounded off to at
least mills and usually cents. You never actually debit or credit partial
mills.

At least that's how I was taught it was supposed to work.
I'm sure someone somewhere isn't following it.

--
greg

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Feature Request for 7.5
Next
From: Peter Childs
Date:
Subject: Re: Feature Request for 7.5