> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 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 looking like an encoding issue in which 
pgAdmin (well, wxWidgets) isn't converting the £ to utf-8 and back correctly. 
It does appear to be working correctly in psql.

Sorry for the noise.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to