Re: Index Ops supporting money type - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Index Ops supporting money type
Date
Msg-id 7916.971934054@sss.pgh.pa.us
Whole thread Raw
In response to Index Ops supporting money type  ("Rich Ryan" <rich@usedcars.com>)
List 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 by date:

Previous
From: "Rich Ryan"
Date:
Subject: Index Ops supporting money type
Next
From: Chris
Date:
Subject: Re: INHERITS doesn't offer enough functionality