Re: New version of money type - Mailing list pgsql-hackers

From David Fetter
Subject Re: New version of money type
Date
Msg-id 20060930054353.GH24766@fetter.org
Whole thread Raw
In response to Re: New version of money type  (tomas@tuxteam.de)
Responses Re: New version of money type  (tomas@tuxteam.de)
List pgsql-hackers
On Sat, Sep 30, 2006 at 04:42:13AM +0000, tomas@tuxteam.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Fri, Sep 29, 2006 at 12:19:07PM +0200, Martijn van Oosterhout wrote:
> > On Thu, Sep 28, 2006 at 06:32:11PM -0500, Jim C. Nasby wrote:
> If you are at that, it's worth noting that the currency tag consists
> of three capital ASCII letters. That would be fifteen bits, take or
> give.

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 leaves forty-eightish bits for the number or about 10^14.

By the above calculation, 56 bits or about 7.2 * 10^16.

> THis is only half-serious, since there are other problems with
> currencies (their value is dependent on time, all that Pandora's
> box).

It's not just dependent on time.  Exchange rates vary in such a way
that the relationships are not always transitive :P

Cheers,
D
-- 
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666                             Skype: davidfetter

Remember to vote!


pgsql-hackers by date:

Previous
From: tomas@tuxteam.de
Date:
Subject: Re: New version of money type
Next
From: tomas@tuxteam.de
Date:
Subject: Re: New version of money type