Joshua D. Drake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mon, 26 Nov 2007 23:47:04 -0500 (EST)
> Bruce Momjian <bruce@momjian.us> wrote:
>
> > Perhaps all we need is a way to accomplish the casting so it isn't
> > automatic. This works:
> >
> > test=> SELECT regexp_replace('2343'::money::text, '[^$,]*',
> > '', 'g')::numeric; regexp_replace
> > ----------------
> > 2343.00
> > (1 row)
> >
> > but the '$' and ',' are locale-specific and I can't think of a way to
> > do this generically.
>
> With a regex?
The problem is there is no locale-independent way to determine if
'123.456' is ~123k or ~123. I think we are going to need a way to
output the MONEY value without a currency and thousands symbols.
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +