> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Shane Ambler
> Sent: 09 October 2006 09:06
> To: PostgreSQL Hackers
> Subject: Re: [HACKERS] Casting to money
>
> Tom Lane wrote:
> > "Dave Page" <dpage@vale-housing.co.uk> writes:
> >> select '$123.45'::money
> >> ERROR: invalid input syntax for type money: "$123.45"
> >> select '£123.00'::money
> >> ERROR: invalid input syntax for type money: "£123.00"
> >
> > So ... what locale are you trying this in?
> >
> I get the following from 8.2beta1 - looks like it doesn't like the
> double quotes.
Double quotes are used for object names - "MySchema"."MyTable" for example. I didn't even bother testing them.
> postgres=# select '123.45'::money;
> money
> ---------
> $123.45
> (1 row)
Now that's interesting - on the Windows server, pgAdmin gets a blank string back. On further investigation, this is
lookinglike an encoding issue in which pgAdmin (well, wxWidgets) isn't converting the £ to utf-8 and back correctly. It
doesappear to be working correctly in psql.
Sorry for the noise.
Regards, Dave.