Re: [HACKERS] Casting to money

2006-10-09 Thread Dave Page
-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

Re: [HACKERS] Casting to money

2006-10-09 Thread Dave Page
-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

Re: [HACKERS] Casting to money

2006-10-09 Thread Shane Ambler
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 -

Re: [HACKERS] Casting to money

2006-10-09 Thread Albe Laurenz
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

Re: [HACKERS] Casting to money

2006-10-09 Thread Dave Page
-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

[HACKERS] Casting to money

2006-10-08 Thread Dave Page
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

Re: [HACKERS] Casting to money

2006-10-08 Thread Tom Lane
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