Search Postgresql Archives

Re: About the MONEY type

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

 



On 11/30/2016 12:16 PM, John McKown wrote:
Speaking generically, ​I guess maybe MONEY needs to be somewhat like a TIMESTAMP. At least in PostgreSQL​, a TIMESTAMP can contain a TIMEZONE. I guess a MONEY type should contain a modifier identifying the issuer of the currency (E.g. U.S. Dollar vs Canadian Dollar vs. Yen vs. Yuan vs. "precious metal").



and then it would need to be able to convert between all those units?        great fun.   it probably needs a time too, as those conversion units vary with time.   worse, they vary with where you convert the money and which way, and how much the converter skims....  In the real world,  US$ -> € -> US$  will not give you back the same amount.


note, btw, TIMESTAMP WITH TIME ZONE doesn't actually store the timezone... rather, it converts it to an internal representation of GMT, and then converts it back to display time at the client's current (or specified) time zone.


-- 
john r pierce, recycling bits in santa cruz

[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