Re: New version of money type

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: New version of money type
Дата
Msg-id 20060929101907.GD8702@svana.org
обсуждение исходный текст
Ответ на Re: New version of money type  ("Jim C. Nasby" <jim@nasby.net>)
Ответы Re: New version of money type  (tomas@tuxteam.de)
Список 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Block B-Tree concept
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Block B-Tree concept