Re: Index Ops supporting money type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Index Ops supporting money type
Дата
Msg-id 7916.971934054@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Index Ops supporting money type  ("Rich Ryan" <rich@usedcars.com>)
Список pgsql-hackers
"Rich Ryan" <rich@usedcars.com> writes:
> Does anyone know if there is an operator class that supports the money data
> type?

There is not.

Type money is on its way out anyway, at least in its current
incarnation, because it's (a) nonstandard, (b) doesn't support
a reasonable number of digits, and (c) isn't internationalizable.
While (a) is not a fatal objection, (b) and (c) mean the type is
pretty badly crippled.

I doubt that anyone will want to do any work on money in its present
form.  Sooner or later it ought to be reimplemented as an I/O skin
on type "numeric" ... hopefully with decent locale support.  In the
meantime, efforts like adding index support seem like throwing good
work after bad.

I suggest using type numeric for now.
        regards, tom lane


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

Предыдущее
От: "Rich Ryan"
Дата:
Сообщение: Index Ops supporting money type
Следующее
От: Chris
Дата:
Сообщение: Re: INHERITS doesn't offer enough functionality