Re: [GENERAL] Dealing with number formats when server and client aredifferent locales

Поиск
Список
Период
Сортировка
От Rob Northcott
Тема Re: [GENERAL] Dealing with number formats when server and client aredifferent locales
Дата
Msg-id AM3PR08MB06104C8327C7904E725902DC9B970@AM3PR08MB0610.eurprd08.prod.outlook.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Dealing with number formats when server and client are different locales  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 06 September 2017 15:49
To: Rob Northcott <Rob.Northcott@compilator.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Dealing with number formats when server and client are different locales

Rob Northcott <Rob.Northcott@compilator.com> writes:
> The problem we've got is that our app (running on PCs) generates
> commands to send to the SQL server, such as UPDATE customers SET cus_balance = 10.4 WHERE cus_key = 'A001'
> This has been working historically because the clients were always UK-based.  Now some users are wanting to use
Europeansetups with commas as decimals.  This is fine inside the application itself but any SQL command strings
generatedcome out in the client PC's local format settings (SET cus_balance = 10,4) and the server doesn't like that. 

>>I was afraid you were going to say that.  There's exactly no chance that that syntax >>would work as you're hoping

>>You're gonna have to fix your app.


Yes I think I am - I've been looking at the links you sent before about lc_numeric and it isn't going to help.  At the
timethis app was written nobody was concerned about foreign formats and didn't think about what would happen if the
decimalseparator wasn't a dot.  Now there is a need for it to be used by people in Scandinavia.  Bummer... 

I'll get on with changing it then

Thanks for the help anyway

Rob




В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Dealing with number formats when server and client are different locales
Следующее
От: Steve Atkins
Дата:
Сообщение: Re: [GENERAL] Schema/table replication