| От | David Garamond |
|---|---|
| Тема | Re: Money data type in PostgreSQL? |
| Дата | |
| Msg-id | 3FCD9E62.20702@zara.6.isreserved.com обсуждение исходный текст |
| Ответ на | Re: Money data type in PostgreSQL? (Oliver Elphick <olly@lfix.co.uk>) |
| Список | pgsql-general |
Oliver Elphick wrote: > > You should not regard amounts in different currencies as equivalent. > You cannot add Euros to dollars and get a meaningful figure; so they > should not be in the same column. I plan to store amount in a column (NUMERIC) and currency id in another (CHAR(3)). Plus another column for amount in 'standard' currency (e.g. USD; all addition/sum will be done to this column). > You should only use NUMERIC for money; any kind of floating point > representation will lose detail somewhere along the line. (I suppose > you could use BIGINT for Japanese Yen.) -- dave
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера