-----BEGIN PGP SIGNED MESSAGE-----
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:
> > What would be ideal is a money type that stored what currency was used
> > and let you change precision (within reason).
> The taggedtypes version of currency does half of that, by storing the
> currency and allowing the output format to depend on that. It doesn't
> allow you to easily change the precision though, that would require
> user-defined typmod which is still under discussion.
> It would be possible to create a taggedtypes version of currency based
> on int64. With the currency tag it would be 12 bytes total. And the
> number of decimal places could be defined per currency...
> Interesting thought, probably wouldn't take more than an hour to whip
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.
That leaves fourty-eightish bits for the number or about 10^14.
THis is only half-serious, since there are other problems with
currencies (their value is dependent on time, all that Pandora's box).
- -- tomÃ¡s
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
-----END PGP SIGNATURE-----
In response to
pgsql-hackers by date
|Next:||From: David Fetter||Date: 2006-09-30 05:43:53|
|Subject: Re: New version of money type|
|Previous:||From: Bruce Momjian||Date: 2006-09-30 03:55:18|
|Subject: Re: Per-database search_path|