Re: About the MONEY type - Mailing list pgsql-general

From John R Pierce
Subject Re: About the MONEY type
Date
Msg-id 41b73933-922e-bb6a-e264-d2204f39a816@hogranch.com
Whole thread Raw
In response to Re: About the MONEY type  (John McKown <john.archie.mckown@gmail.com>)
Responses Re: About the MONEY type
Re: [GENERAL] About the MONEY type
List pgsql-general
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

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: About the MONEY type
Next
From: George Weaver
Date:
Subject: Logging for 2 instances of PostgreSQL