Skip site navigation (1) Skip section navigation (2)

Re: New version of money type

From: David Fetter <david(at)fetter(dot)org>
To: tomas(at)tuxteam(dot)de
Cc: 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 05:43:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, Sep 30, 2006 at 04:42:13AM +0000, tomas(at)tuxteam(dot)de wrote:
> 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

David Fetter <david(at)fetter(dot)org>
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

In response to


pgsql-hackers by date

Next:From: tomasDate: 2006-09-30 08:23:14
Subject: Re: New version of money type
Previous:From: tomasDate: 2006-09-30 04:42:13
Subject: Re: New version of money type

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group