Re: Casting money to numeric(10,2)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ben Stringer <ben(at)magicrock(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Casting money to numeric(10,2)
Date: 2001-01-11 19:48:42
Message-ID: 12366.979242522@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ben Stringer <ben(at)magicrock(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Goodman 2001-01-11 19:51:43 SQL queries from within PL/PERL triggers?
Previous Message Tom Lane 2001-01-11 19:46:02 Re: access checking using sql in 7.1beta3