Re: Extracting data from deprecated MONEY fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tino Wildenhain <tino(at)wildenhain(dot)de>
Cc: Shane Ambler <pgsql(at)Sheeky(dot)Biz>, Ken Winter <ken(at)sunward(dot)org>, "'PostgreSQL pg-general List'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Extracting data from deprecated MONEY fields
Date: 2008-06-07 15:24:34
Message-ID: 20231.1212852274@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tino Wildenhain <tino(at)wildenhain(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Simonis 2008-06-07 16:14:20 fitler database list
Previous Message Tom Lane 2008-06-07 15:19:10 Re: IN vs EXISTS