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" writes:

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 li

Re: [HACKERS] Casting to money

2006-10-09 Thread Shane Ambler
Tom Lane wrote: "Dave Page" 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

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---

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" writes: > > select '$123.45'::mo

Re: [HACKERS] Casting to money

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

[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 variety