Search Postgresql Archives

Re: to_char with locale decimal separator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/29/2013 07:27 AM, Ingmar Brouns wrote:
On Mon, Jul 29, 2013 at 3:45 PM, Adrian Klaver <adrian.klaver@xxxxxxxxx> wrote:
On 07/29/2013 04:24 AM, Ingmar Brouns wrote:

Hi,


This work?:

test=> select replace(1.500::text, '.', ',');
  replace
---------
  1,500
(1 row)



that would work, but that requires keeping track of which decimal
separator to use yourself.  If you change the locale, the code
has to change as well. As to_char already converts the decimal
separator in a locale aware manner, I wonder whether there is a
way to do this using the existing locale facilities.

Sorry, I just got to your second post where you explained that. I can't think of a way at the moment.


Ingmar




--
Adrian Klaver
adrian.klaver@xxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux