On Sat, Sep 30, 2006 at 11:36:04AM -0400, Xiaofeng Zhao wrote:
> >I feel silly for even mentioning this, but there are less than 256
> >countries in the UN, and as far as I know, each has at most one
> >currency, so you could use 8 bits instead of 15.
> That's not always true, e.g. China has RMB and HKD. Also Taiwan is
> not a member country of UN but I don't think one would exclude TWD.
Right. There are several countries whose currency is USD, so I still
contend that at any given instant, there are fewer than 256
currencies, so we're back to 8 bits.
> 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.
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Remember to vote!
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2006-09-30 17:00:05|
|Subject: Re: New version of money type |
|Previous:||From: Xiaofeng Zhao||Date: 2006-09-30 15:36:04|
|Subject: Re: New version of money type|