Re: New version of money type

From: "Xiaofeng Zhao" <xf10036(at)hotmail(dot)com>
To: "David Fetter" <david(at)fetter(dot)org>
Cc: <tomas(at)tuxteam(dot)de>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>, <llonergan(at)greenplum(dot)com>, <sfrost(at)snowman(dot)net>, <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: New version of money type
Date: 2006-09-30 18:49:03
Message-ID: BAY124-DAV16FE779A47D43A842E3C1AE5190@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> There'll also times a country may transit from one currency to
>> another. Even a currency (currency of most continental European
>> countries before Euro) is no more being used, it may still need to
>> be supported.
>
> The "money" type is far too simplistic to model this kind of thing. A
> really sophisticated representation of money would have to take time,
> inflation/deflation, pairwise exchange rates, etc. into account. It
> would look more like a schema with a large data set and a large body
> of code loaded into it than it would a data type.

The statement of my bank account does not contain any of the quantities you
mentioned. But when some body open a statement from year 2000, most likely
he expect to see the balance and transcations are in, say, German Marks, not
in Euros.

xz

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-09-30 19:00:57 Re: libedit broke in head
Previous Message Luke Lonergan 2006-09-30 18:38:33 Re: PostgreSQL 8.2beta1 w/ VALUES