| От | 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! :-))
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера