Search Postgresql Archives

Re: Money casting too liberal?

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

 



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@xxxxxxxxxxxxxxxx

______________________________________________

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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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