Re: No migration path for MONEY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: No migration path for MONEY
Дата
Msg-id 4564.1043794034@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: No migration path for MONEY  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
Peter Eisentraut <peter_e@gmx.net> writes:
> How would the new "money" be different from "numeric"?

[ temporarily re-dons currency-trader hat... ]

What would actually be useful is a money type that carries along an
indication of which currency the amount is expressed in (not per-column
as Bruce naively suggested, but right in the datum).  This would allow
conversions to be performed between different currencies, as well as
allowing the correct decoration to be provided on output.

> If we have "money", should we have "length", "mass", and
> "temperature"?  I think not.

Physicists have found use for numeric objects that carry along an
indication of the units they're in --- in other words, not "length" etc,
but a generic "measurement" type that might tag its value as "meters" or
"kilograms" or "furlongs per fortnight".

I'm not eager to go and write such a datatype right now, but if someone
wanted to do the work I'd be in favor of adopting one.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug in LIKE operator processing
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgtcl combined with view with certain insert/update-rules => crash