Inserting Money Types - Mailing list pgsql-novice

From Greg Lindstrom
Subject Inserting Money Types
Date
Msg-id 20061102170225.IYFV27379.ispmxmta09-srv.windstream.net@webmail-relay.alltel.net
Whole thread Raw
Responses Re: Inserting Money Types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hello-

I am running postgres 8.0.8 on a Gento system and am having trouble updating a column of type money (yes, I know it's
depricatedbut I have to work with an existing database).  When we do the initial INSERT statement and pass in a float
itworks fine, but I am writing a routine that takes values from a varchar field of another table and attempts to update
themoney field and I am told I need to cast it.  When I attempt to cast it I'm told that I can't cast a char to money,
floatto money, or numeric to money!   

Is there any way I can get this char value to UPDATE into a money datatype?  If not, we may have to convert our tables
touse numeric, but that will be a very big deal. 

Thanks for your help

Greg Lindstrom


pgsql-novice by date:

Previous
From: "Lenorovitz, Joel"
Date:
Subject: Trouble with plpgsql generic trigger function using special variables
Next
From: Tom Lane
Date:
Subject: Re: Inserting Money Types