From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Erwin Brandstetter <brsaweda(at)gmail(dot)com> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: Failing example for to_number() |
Date: | 2017-08-28 20:53:57 |
Message-ID: | 21767.1503953637@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Erwin Brandstetter <brsaweda(at)gmail(dot)com> writes:
> On 21 August 2017 at 16:30, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
> wrote:
>> On Mon, Aug 21, 2017 at 5:36 AM, Erwin Brandstetter <brsaweda(at)gmail(dot)com>
>> wrote:
>>> The example fails for locales where the comma (',') does not happen to be
>>> the group separator and the dot ('.') is not the decimal point.
>> If one wants to try the example in a language other than in which the
>> example was written they should modify it so that the literal number being
>> parsed in written in conformance to the locale definition for the language
>> you are using.
> I guess there should be some more explanation.
Yeah. How about adding something like this to the "Usage notes for
numeric formatting" between tables 9-26 and 9-27:
* The pattern characters S, L, D, and G represent the sign,
currency symbol, decimal point, and thousands separator characters
defined by the current locale (see lc_monetary and lc_numeric).
The pattern characters period and comma represent those exact
characters, with the meanings of decimal point and thousands
separator, regardless of locale.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2017-08-28 22:25:34 | Re: mistype |
Previous Message | Tom Lane | 2017-08-28 20:37:34 | Re: to_char(): 'FM' also suppresses *trailing* zeroes |