-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: 09 October 2006 04:15
To: Dave Page
Cc: PostgreSQL Hackers
Subject: Re: [HACKERS] Casting to money
Dave Page dpage@vale-housing.co.uk writes:
select '$123.45'::money
ERROR: invalid input syntax for type
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave Page
Sent: 09 October 2006 08:42
To: Tom Lane
Cc: PostgreSQL Hackers
Subject: Re: [HACKERS] Casting to money
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED
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 -
postgres=# select 123.45::money;
ERROR: column 123.45 does not exist
LINE 1: select 123.45::money;
^
postgres=# select $123.45::money;
ERROR: column $123.45 does not exist
LINE 1: select $123.45::money;
^
You are on the wrong mailing list :^) Try
-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
A pgAdmin user has just pointed out that the data editor doesn't work with
money columns, apparently because it casts data when inserting/updating it. The
docs for money say:
The money type stores a currency amount with a fixed fractional precision; see
Table 8-3. Input is accepted in a
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?
regards, tom lane