Subject: [PATCHES] Fixes for MONEY type using locale
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/26/2007 9:19:48 PM
Bruce Momjian <bruce@momjian.us> writes:
> Added to TODO list:
> * Allow MONEY to be cast to/from other numeric data types
So in other words, that's been added to the TODO list *purely* on your
own say-so, and not because any users asked for it or anyone else thinks
it's a good idea.
Since MONEY really ought to be considered a tagged type, I'm not at all
impressed with the idea that there should be default casts between it
and plain numerics. There's a fundamental semantic gap there.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Subject: [PATCHES] Fixes for MONEY type using locale
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/26/2007 10:04:51 PM
"Joshua D. Drake" <jd@commandprompt.com> writes:
> Well if we are going to continue to support money (which I am against)
> we should support the casting to numeric as that is by far a more
> common implementation of money and we will have mixed environments.
So, you don't use MONEY, and you don't want to, but nonetheless you
know better than the people who do use MONEY what they need.
Aside from the semantic-gap issue, there is the point that providing
a cast might actually mask application errors. I can well imagine
cases where one of the reasons for using MONEY is *exactly* that it's
not a plain number or easily convertible to one.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
|