Re: [GENERAL] A real currency type

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [GENERAL] A real currency type
Дата
Msg-id 20060324171000.GD8718@svana.org
обсуждение исходный текст
Ответ на Re: [GENERAL] A real currency type  (August Zajonc <augustz@augustz.com>)
Список pgsql-hackers
On Fri, Mar 24, 2006 at 08:54:54AM -0800, August Zajonc wrote:
> Martin,
>
> This would be extremely useful to have.
>
> For example, if I store currencies tagged properly, I could do a select
> and multiply the currency tag by the factor associated with that tag.
> This would allow easily quoting financials in a standard currency, but
> protect against type mismatches presumably at the database level (USD +
> AUD fails).

Yep, it does do that. And it's very handy :)

> Either way, it should be easy to add tags (ie, INSERT or similar) or get
> a list of them (SELECT * from somewhere where type = "currency"). I'm
> sure this later will be the case system catalog or not.

The current implementation allows that. You just insert new tags or
update them.

Anyway, the code works if you want ot try it. Otherwise, maybe someone
will eventually build something equivalent into the backend...

Have a nice day.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: August Zajonc
Дата:
Сообщение: Re: [GENERAL] A real currency type
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Role incompatibilities