Re: Casting to money
От | Dave Page |
---|---|
Тема | Re: Casting to money |
Дата | |
Msg-id | E7F85A1B5FF8D44C8A1AF6885BC9A0E40176D39B@ratbert.vale-housing.co.uk обсуждение исходный текст |
Ответ на | Re: Casting to money (Shane Ambler <pgsql@007Marketing.com>) |
Список | pgsql-hackers |
> -----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.
В списке pgsql-hackers по дате отправления: