Re: [PATCHES] [PATCH] Contrib C source for casting MONEY to INT[248] and FLOAT[48]
Re: [PATCHES] [PATCH] Contrib C source for casting MONEY to INT[248] and FLOAT[48]
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"David D. Kilzer" writes: > Attached please find a patch to cast (convert) the MONEY type to any one > of the following types: > INT2, INT4, INT8, FLOAT4, FLOAT8 Hmm. It strikes me as a rather bad idea to introduce implicit casting of MONEY to all these other types --- I suspect that's going to create a bunch of parsing ambiguities. > I wrote this because I needed to convert MONEY to a standard decimal > value and didn't want to do it on the client in Perl, and I didn't want > to use a plpgsql function that used string parsing. Seems like a better answer is to use NUMERIC instead of MONEY in the first place... regards, tom lane