Re: About the MONEY type

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: About the MONEY type
Дата
Msg-id 41b73933-922e-bb6a-e264-d2204f39a816@hogranch.com
обсуждение исходный текст
Ответ на Re: About the MONEY type  (John McKown <john.archie.mckown@gmail.com>)
Ответы Re: About the MONEY type
Re: [GENERAL] About the MONEY type
Список pgsql-general
On 11/30/2016 12:16 PM, John McKown wrote:
Speaking generically, ​I guess maybe MONEY needs to be somewhat like a TIMESTAMP. At least in PostgreSQL​, a TIMESTAMP can contain a TIMEZONE. I guess a MONEY type should contain a modifier identifying the issuer of the currency (E.g. U.S. Dollar vs Canadian Dollar vs. Yen vs. Yuan vs. "precious metal").



and then it would need to be able to convert between all those units?        great fun.   it probably needs a time too, as those conversion units vary with time.   worse, they vary with where you convert the money and which way, and how much the converter skims....  In the real world,  US$ -> € -> US$  will not give you back the same amount.


note, btw, TIMESTAMP WITH TIME ZONE doesn't actually store the timezone... rather, it converts it to an internal representation of GMT, and then converts it back to display time at the client's current (or specified) time zone.


-- 
john r pierce, recycling bits in santa cruz

В списке pgsql-general по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: About the MONEY type
Следующее
От: George Weaver
Дата:
Сообщение: Logging for 2 instances of PostgreSQL