Search Postgresql Archives

Re: Money data type - Deprecated?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux