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

From Ben Stringer
Subject Casting money to numeric(10,2)
Date
Msg-id 3A5D1630.1D16C46A@magicrock.net
Whole thread Raw
Responses Removing the row limit
Re: Casting money to numeric(10,2)
List pgsql-general
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.

I can create a table in the 6.5.2 DB with fields of type
numeric(10,2), but when I try and insert into this table

Ie.

insert
   into new (purchase_price)
select
   purchase_price::numeric(10,2)
from
   old
;

I get ERROR:  No such function 'numeric' with the specified attributes

I tried the 6.5.2 documentation, but it looked to me like this should
work.

Any suggestions appreciated.

Thanks, Ben
--
_____________________________________________________________
 Ben Stringer
 Burbong Consultants P/L   ACN 092 664 198
 ben@burbong.com    http://www.burbong.com   ph 0402 211 638

pgsql-general by date:

Previous
From: Richard Seymour
Date:
Subject: automatic timestamp question
Next
From: Tom Lane
Date:
Subject: Re: "Cluster" means "tangle" for me