Re: Money casting too liberal?

Поиск
Список
Период
Сортировка
От Shaun Thomas
Тема Re: Money casting too liberal?
Дата
Msg-id 5154B962.6090207@optionshouse.com
обсуждение исходный текст
Ответ на Re: Money casting too liberal?  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On 03/28/2013 04:36 PM, John R Pierce wrote:

> or to another extreme, part of the data, such that different rows could
> have different monetary units.    (eg, money is implemented as a pair
> (currency,amount).    eeek, then you'd need exchange rate tables and
> such.   hahahahaha, what a nightmare.

Naw. Only if you wanted to convert them. I personally wonder why it
wasn't implemented this way to begin with. Like TSTZ, with a MONEY type,
the currency is the TZ segment. XXX amount in YYY encoding, with the
default being the currency of the locale if not otherwise specified. It
would still be useless for calculations in applications requiring more
significant figures, but would make more sense than the currently
magically morphing value it is now.

"Hey, we just shipped a DB server to Japan, and now all of the monetary
values are wrong. WTF!"

Yeah... no. :)

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-676-8870
sthomas@optionshouse.com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email


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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Money casting too liberal?
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: Money casting too liberal?