Re: Casting money to numeric(10,2) - Mailing list pgsql-general

From Tom Lane
Subject Re: Casting money to numeric(10,2)
Date
Msg-id 12366.979242522@sss.pgh.pa.us
Whole thread Raw
In response to Casting money to numeric(10,2)  (Ben Stringer <ben@magicrock.net>)
List pgsql-general
Ben Stringer <ben@magicrock.net> writes:
> I'm trying to migrate several tables from a 6.5.2 DB to a
> 7.0.2 DB, and having trouble casting money (in the old DB)
> to numeric(10,2) prior to doing a pg_dump.

Hm.  It doesn't seem that there is a cast path from money to anything,
even in latest sources.  You might have to resort to dumping the table
as-is, then editing the dump file to change the column type from money
to numeric in the CREATE TABLE (and edit out all the dollar signs and
commas in the data, too).  Ugh.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: access checking using sql in 7.1beta3
Next
From: Josh Goodman
Date:
Subject: SQL queries from within PL/PERL triggers?