Re: Money data type in PostgreSQL?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Money data type in PostgreSQL?
Дата
Msg-id 87fzg26i4d.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на Re: Money data type in PostgreSQL?  ("Claudio Lapidus" <clapidus@hotmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Feature Request for 7.5
Следующее
От: Peter Childs
Дата:
Сообщение: Re: Feature Request for 7.5