Re: monetary bug - Mailing list pgsql-hackers

From Tom Lane
Subject Re: monetary bug
Date
Msg-id 11763.1093205783@sss.pgh.pa.us
Whole thread Raw
In response to Re: monetary bug  (Oliver Elphick <olly@lfix.co.uk>)
Responses Re: monetary bug
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: monetary bug
Next
From: Peter Eisentraut
Date:
Subject: Re: monetary bug