Re: [GENERAL] About the MONEY type - Mailing list pgsql-general

From Gavin Flower
Subject Re: [GENERAL] About the MONEY type
Date
Msg-id 0889b71c-1c01-97c8-018e-f9e1583392ef@archidevsys.co.nz
Whole thread Raw
In response to About the MONEY type  (Tobia Conforto <tobia.conforto@gruppo4.eu>)
Responses Re: [GENERAL] About the MONEY type
List pgsql-general
On 18/12/16 12:25, Bruce Momjian wrote:
> On Wed, Nov 30, 2016 at 01:35:12PM -0800, John R Pierce wrote:
>> 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.
> Right, TIMESTAMP WITH TIME ZONE converts the timestamp value to the
> local time zone on output.  Imagine a monetary type that converted the
> money amount to local currency on output --- that would be cool.
>
Hmm...

Would need to know the appropriate conversion rate. the 2 obvious
dates/times, on entry and now, may neither be the one wanted.

Also, often the buy/sell conversion rates are not the same!

Am sure there also other issues.

I don't think automatic conversion is as easy as you make it out to be.



Cheers,

Gavin



pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: [GENERAL] Concatenating NULL with JSONB value return NULL
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Concatenating NULL with JSONB value return NULL