Re: monetary bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: monetary bug
Дата
Msg-id 11763.1093205783@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: monetary bug  (Oliver Elphick <olly@lfix.co.uk>)
Ответы Re: monetary bug  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Oliver Elphick <olly@lfix.co.uk> writes:
> It seems to me a monetary type is a complex type consisting of currency
> code and amount -- but you couldn't sum mixed currencies.  Or else it is
> limited to the currency of the locale, which doesn't seem particularly
> useful.

In a former lifetime I worked with databases involving amounts of
different currencies, and I didn't find type money useful for that
either.  But I think that's a specialized requirement and we'd be
unlikely to consider putting a type that *is* useful for that into
the standard distribution.

I think the money type has very simple, limited goals: give me a numeric
column that has I/O format determined by the current LC_MONETARY setting.
Sure, that doesn't solve every money-related problem, but it would have
usefulness enough to justify the limited amount of implementation effort
involved.  The issues with the current implementation aren't really
related to that, they are related to a poor choice of underlying
representation.

> I think that it should be removed altogether.

If no one steps up and fixes it, eventually it will be.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: monetary bug
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: monetary bug