Joshua D. Drake wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Mon, 26 Nov 2007 23:47:04 -0500 (EST) > Bruce Momjian <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match