From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
Cc: | "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-29 10:19:07 |
Message-ID: | 20060929101907.GD8702@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
up.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2006-09-29 10:33:28 | Re: Block B-Tree concept |
Previous Message | Martijn van Oosterhout | 2006-09-29 10:13:05 | Re: Block B-Tree concept |