Re: unexpected character used as group separator by to_char

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: unexpected character used as group separator by to_char
Date: 2021-03-09 21:22:07
Message-ID: 2044800.1615324927@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> writes:
> Having a database with the proper lc_numeric setting for each country, and using to_char/to_number to manipulate numbers is much more appealing than writing my own parser in my front end. But this weird space is getting in my way.

The point here is that 'G' and related format codes act as specified by
your LC_MONETARY locale. If you don't like the results, you need to use
a different locale.

(I suppose you could also use regexp_replace to convert random forms
of whitespace to plain ASCII space.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2021-03-09 21:32:20 Re: unexpected character used as group separator by to_char
Previous Message Vincent Veyron 2021-03-09 21:15:04 Re: unexpected character used as group separator by to_char