Search Postgresql Archives

Re: unexpected character used as group separator by to_char

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

 



On Wed, 10 Mar 2021 02:24:57 -0300
Alvaro Herrera <alvherre@xxxxxxxxxxxxxx> wrote:
> 
> That space (0xe280af) is U+202F, which appears to be used for French and
> Mongolian languages (exclusively?)

On Tue, 09 Mar 2021 18:57:05 -0500
Tom Lane <tgl@xxxxxxxxxxxxx> wrote:

> In any case, you could force the issue with a pattern like '[\s\uNNNN]'
> for whatever the code point of that character is.

On Wed, 10 Mar 2021 09:41:19 +0100
Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote:

>  SELECT replace(to_char(2345.10, 'FM999G990D00'), E'\u202F', ' ');


Thank you all for the helpful answers, I can work with that.

Strange that to_char() and to_number() would use a different separator, though :

select to_number(to_char(1234.56, 'FM999G990D00'), 'FM999G990D00');
 to_number 
-----------
    1234.5

select to_number(replace(to_char(1234.56, 'FM999G990D00'),E'\u202F', ' '), 'FM999G990D00');
 to_number 
-----------
   1234.56

-- 
					Bien à vous, Vincent Veyron 

https://compta.libremen.com
Logiciel libre de comptabilité générale en partie double






[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux