Re: Money type todos?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Money type todos?
Date: 2007-03-21 06:31:44
Message-ID: 22914.1174458704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> writes:
> Tom Lane skrev:
>> Whether it is actually ever going to disappear is not agreed upon.

> What is the reason to keep it?

The words-of-one-syllable answer is that D'Arcy Cain is still willing
to put work into supporting the money type, and if it still gets the
job done for him then it probably gets the job done for some other
people too.

Personally, as a former currency trader I've not seen any proposals on
this list for a "money" type that I'd consider 100% feature complete.
The unit-identification part of it is interesting, but pales into
insignificance compared to the problem that the unit values vary
constantly; what's more, that variance is not to be swept under the rug
but is exactly the data that you are interested in. Next, the units
themselves change from time to time (euro? what's that?); next, the
interconversion rates aren't all exactly equivalent, and that's not
noise either but rather very interesting data (see "arbitrage").

So I'm not feeling inclined to try to prescribe that datatype X is
good while datatype Y is bad. It's more about whether there's an
audience for any particular datatype definition. The present money
code gets the job done for D'Arcy and probably some other people,
and we see some straightforward ways to improve it to serve some
more cases, so what's wrong with pursuing that path?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message db 2007-03-21 08:08:44 Re: Money type todos?
Previous Message Jeremy Drake 2007-03-21 06:12:55 Re: patch adding new regexp functions