Re: Money data type - Deprecated?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Decibel! <decibel(at)decibel(dot)org>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Andrew Sullivan <ajs(at)commandprompt(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Money data type - Deprecated?
Date: 2008-06-16 21:07:53
Message-ID: 20080616210753.GI4792@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message TJ O'Donnell 2008-06-17 00:24:49 cool code_swarm animation of PostgreSQL development since 1996
Previous Message Michael Orechoff 2008-06-16 19:33:50 Re: Win32 8.3.3 install fail (sufficient privileges to install system services).