Re: unexpected character used as group separator by to_char
Rob Sargent <robjsargent@gmail.com>
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@lists.postgresql.org
Date: 2021-03-09T21:32:20Z
Lists: pgsql-general
On 3/9/21 2:22 PM, Tom Lane wrote: > Vincent Veyron <vv.lists@wanadoo.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 > > I'm in David's camp on this one: there are plenty of currency format conversion libraries from which to choose. rjs