From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: unexpected character used as group separator by to_char
Date: Tue, 9 Mar 2021 14:32:20 -0700
Message-ID: <f4135958-86f4-b68d-5315-bcc6d38c032d@gmail.com> (raw)
In-Reply-To: <2044800.1615324927@sss.pgh.pa.us>
References: <20210309212821.437795da590228b5c552eead@wanadoo.fr>
<CAKFQuwZsE5riw9cTED_uXmWHq1VYkSoGU9BZRwVb8aOvexGUWg@mail.gmail.com>
<20210309221504.309aba890549a6d4e3d16fda@wanadoo.fr>
<2044800.1615324927@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com
Subject: Re: unexpected character used as group separator by to_char
In-Reply-To: <f4135958-86f4-b68d-5315-bcc6d38c032d@gmail.com>
References: <20210309212821.437795da590228b5c552eead@wanadoo.fr> <CAKFQuwZsE5riw9cTED_uXmWHq1VYkSoGU9BZRwVb8aOvexGUWg@mail.gmail.com> <20210309221504.309aba890549a6d4e3d16fda@wanadoo.fr> <2044800.1615324927@sss.pgh.pa.us> <f4135958-86f4-b68d-5315-bcc6d38c032d@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox