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

Поиск
Список
Период
Сортировка
От Carlos Moreno
Тема Re: I want more Money (the data type, of course! :-))
Дата
Msg-id 3B0C8B1F.7CA5E0C0@mochima.com
обсуждение исходный текст
Ответ на Re: I want more Money (the data type, of course! :-))  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: Re: I want more Money (the data type, of course! :-))  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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 по дате отправления:

Предыдущее
От: "John"
Дата:
Сообщение: Re: Re: perl vs php for postgresql
Следующее
От: hicham bouzdad
Дата:
Сообщение: transactions on Postgresql