Re: Money casting too liberal? - Mailing list pgsql-general

From Shaun Thomas
Subject Re: Money casting too liberal?
Date
Msg-id 5154B962.6090207@optionshouse.com
Whole thread Raw
In response to Re: Money casting too liberal?  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
On 03/28/2013 04:36 PM, John R Pierce wrote:

> or to another extreme, part of the data, such that different rows could
> have different monetary units.    (eg, money is implemented as a pair
> (currency,amount).    eeek, then you'd need exchange rate tables and
> such.   hahahahaha, what a nightmare.

Naw. Only if you wanted to convert them. I personally wonder why it
wasn't implemented this way to begin with. Like TSTZ, with a MONEY type,
the currency is the TZ segment. XXX amount in YYY encoding, with the
default being the currency of the locale if not otherwise specified. It
would still be useless for calculations in applications requiring more
significant figures, but would make more sense than the currently
magically morphing value it is now.

"Hey, we just shipped a DB server to Japan, and now all of the monetary
values are wrong. WTF!"

Yeah... no. :)

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-676-8870
sthomas@optionshouse.com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Money casting too liberal?
Next
From: Gavin Flower
Date:
Subject: Re: Money casting too liberal?