Money reformatting - Mailing list pgsql-general

From Rich Ryan
Subject Money reformatting
Date
Msg-id 086101c183ad$8a86de80$1a02a8c0@gateway
Whole thread Raw
In response to Re: foreign key creation problem  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses How Can I reach the mail archieve ?
Re: Money reformatting
List pgsql-general
I have a price field of type 'money'. 90% of the time, the output format of
money $x.xx, is great. But occasionally I need to strip the $ and truncate
the decimal places, i.e. turn it into an int. Is there any easy way to do
this? None of the built-in postgres text formatting functions take the money
type as an arg. I tried type casting, but that didn't work either. I tried
to check the mail list archives, but it's been down for about 2-3 days.
Error I get is
An error occured!
connectDBStart() -- connect() failed: Connection refused Is the postmaster
running (with -i) at 'db.postgresql.org' and accepting connections on TCP/IP
port 5437?

Thanks much,

Rich





pgsql-general by date:

Previous
From: "Nicolas Bouthors"
Date:
Subject: Postgres graphing.
Next
From: "Rich Ryan"
Date:
Subject: Convert money type to int