Re: Extracting data from deprecated MONEY fields - Mailing list pgsql-general

From Tom Lane
Subject Re: Extracting data from deprecated MONEY fields
Date
Msg-id 20231.1212852274@sss.pgh.pa.us
Whole thread Raw
In response to Re: Extracting data from deprecated MONEY fields  (Tino Wildenhain <tino@wildenhain.de>)
Responses Re: Extracting data from deprecated MONEY fields  ("Ken Winter" <ken@sunward.org>)
List pgsql-general
Tino Wildenhain <tino@wildenhain.de> writes:
>> to_char() and back to numeric shouldn't be a problem within the database
>> and we have regex too if anything fails. I don't think you need to
>> dump and edit the dump to achive that.

> Ah sorry forget that... neither to_char nor cast to text works. Really a
> horrible datatype :(

If you do it within plpgsql it should work.  Just assign the money value
to a text variable (or vice versa).

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: IN vs EXISTS
Next
From: Alvaro Herrera
Date:
Subject: Re: array column and b-tree index allowing only 8191 bytes