Re: Money data type - Deprecated?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Money data type - Deprecated?
Дата
Msg-id 20080616210753.GI4792@svana.org
обсуждение исходный текст
Ответ на Re: Money data type - Deprecated?  (Decibel! <decibel@decibel.org>)
Список pgsql-general
On Mon, Jun 16, 2008 at 11:10:09AM -0500, Decibel! wrote:
> >I personally think that it really belongs in contrib as an example of
> >adding a new type...with all the money bits stripped off, as a
> >strictly fixed precision integer.
>
> I think what it really needs is currency information so that you can
> tell if a value is in USD or something else. But it seems that every
> time that's brought up, people want to start worrying about storing
> conversion tables.

So? Tagged types has a currency type. As long as you provide a way to
extract which currency is meant, people can join on conversion tables.

Now that I think of it, enum's have the necessary machinary already to
map OIDs to strings so you're nearly all the way there... (Except
ofcourse taggedtypes didn't prevent you from adding more currencies
later, which enums don't currently allow you to do).

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Вложения

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

Предыдущее
От: Tino Wildenhain
Дата:
Сообщение: Re: How to INSERT empty line into SEQUENTIAL table from PHP
Следующее
От: TJ O'Donnell
Дата:
Сообщение: cool code_swarm animation of PostgreSQL development since 1996