Re: monetary bug - Mailing list pgsql-hackers

From Tom Lane
Subject Re: monetary bug
Date
Msg-id 11712.1093205237@sss.pgh.pa.us
Whole thread Raw
In response to Re: monetary bug  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: monetary bug  (Peter Eisentraut <peter_e@gmx.net>)
Re: monetary bug  (Hannu Krosing <hannu@tm.ee>)
Re: monetary bug  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> We keep hoping someone will step up to the plate and rewrite it,
>> instead. Per previous discussion, the type really ought to be a thin
>> layer over "numeric", with most likely no operations of its own
>> except I/O conversion.

> And what would it do with it?  Add a currency symbol?  Which one?  Which 
> form?  Where?  Format the numbers some way?

The idea behind the money type is to format per the lc_monetary locale
setting, which seems perfectly reasonable to me.  Further down the road
we might want per-column locale control, but when we haven't solved that
for text columns it's hardly fair to demand it of type money.

The big beef against the existing money type, IMHO, is the decision to
make the internal representation int32, which makes it hopelessly
overflow-prone.  Fix that and I'd stop telling people not to use it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: monetary bug
Next
From: Tom Lane
Date:
Subject: Re: monetary bug