| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> |
| Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: unexpected character used as group separator by to_char |
| Date: | 2021-03-09 20:33:19 |
| Message-ID: | CAKFQuwZsE5riw9cTED_uXmWHq1VYkSoGU9BZRwVb8aOvexGUWg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Tue, Mar 9, 2021 at 1:28 PM Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> wrote:
> For the record below, I wish to display 'credit' properly formated in an
> html form, using to_char(credit, 'FM999G990D00')
>
> ^^^^^^^^^^^^^ ^^^^^^^^^^^^
> What can I do to get a standard space as group separator for my numbers?
>
By using "G" you are giving up control and letting your locale settings
decide what gets output. You can continue to use to_char but take control
back by being explicit, or pass actual numbers into and out of the database
and let your front-end deal with presentation concerns. I suggest the
latter.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2021-03-09 20:57:28 | Re: Need help with clarification on stored procedure support in PostGreSQL database |
| Previous Message | Vincent Veyron | 2021-03-09 20:28:21 | unexpected character used as group separator by to_char |