Re: Money data type - Deprecated? - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Money data type - Deprecated?
Date
Msg-id 20080616210753.GI4792@svana.org
Whole thread Raw
In response to Re: Money data type - Deprecated?  (Decibel! <decibel@decibel.org>)
List 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.

Attachment

pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: How to INSERT empty line into SEQUENTIAL table from PHP
Next
From: TJ O'Donnell
Date:
Subject: cool code_swarm animation of PostgreSQL development since 1996