pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erwin Brandstetter <brsaweda@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-docs@postgresql.org <pgsql-docs@postgresql.org>
Subject: Re: Failing example for to_number()
Date: Mon, 28 Aug 2017 16:53:57 -0400
Message-ID: <21767.1503953637@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGHENJ45Lt40ab8rjLo-OjxuXoLZduJTaBi5iPk-z259nkFsRQ@mail.gmail.com>
References: <CAGHENJ45ymd=GOCu1vwV9u7GmCR80_5tW0fP9C_gJKbruGMHvQ@mail.gmail.com>
	<CAKFQuwaWwR5P8U3Y8C3FSfXHVeBgkLG1utG0g8vb5jSx_swX5g@mail.gmail.com>
	<CAGHENJ45Lt40ab8rjLo-OjxuXoLZduJTaBi5iPk-z259nkFsRQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

Erwin Brandstetter <brsaweda@gmail.com> writes:
> On 21 August 2017 at 16:30, David G. Johnston <david.g.johnston@gmail.com>
> wrote:
>> On Mon, Aug 21, 2017 at 5:36 AM, Erwin Brandstetter <brsaweda@gmail.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


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (6+ messages)  latest in thread

Message-ID: <21767.1503953637@sss.pgh.pa.us>
Permalink:  ../21767.1503953637@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21767.1503953637@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, brsaweda@gmail.com, david.g.johnston@gmail.com
  Subject: Re: Failing example for to_number()
  In-Reply-To: <21767.1503953637@sss.pgh.pa.us>

* 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