Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZivJ4-0005sw-DW for pgsql-committers@arkaria.postgresql.org; Mon, 05 Oct 2015 02:15:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZivJ2-0006kf-Rq for pgsql-committers@arkaria.postgresql.org; Mon, 05 Oct 2015 02:15:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZivJ1-0006jx-9X for pgsql-committers@postgresql.org; Mon, 05 Oct 2015 02:15:11 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZivIy-0002pD-3f for pgsql-committers@postgresql.org; Mon, 05 Oct 2015 02:15:10 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1ZivIx-00080C-47; Sun, 04 Oct 2015 22:15:07 -0400 Date: Sun, 4 Oct 2015 22:15:07 -0400 From: Bruce Momjian To: Tom Lane Cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Further fix for psql's code for locale-aware formatting of numer Message-ID: <20151005021507.GB6797@momjian.us> References: <20151005015752.GA25308@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151005015752.GA25308@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Oops, I guess it wasn't offlist. Anyway, now everyone knows I might have been one of the original authors that required the triple-commit fix. ;-) --------------------------------------------------------------------------- On Sun, Oct 4, 2015 at 09:57:52PM -0400, Bruce Momjian wrote: > > Offlist, I think it was this commit: > > commit 73a7c322c36bb96d4e2d053ff245b0f7b99f09e0 > Author: Bruce Momjian > Date: Sun Jul 10 03:46:13 2005 +0000 > > Add psql \pset numericsep to allow output numbers like 100,000.0 or > 100.000,0. > > Eugen Nedelcu > > which I later wacked around too: > > commit 45a19efa9ec66fa35cc86671e2a1cebfe787fd9f > Author: Bruce Momjian > Date: Thu Jul 14 08:42:37 2005 +0000 > > Change numericsep to a boolean, and make it locale-aware. > > commit bd157821649ae203b9c8ce8daf4ec027a0003351 > Author: Bruce Momjian > Date: Thu Jul 14 21:12:41 2005 +0000 > > Enable multi-byte thousands_sep and decimal_point for numericsep. > > commit 507465525e8c3e4ebf0159ac07c915dd609cd6b3 > Author: Bruce Momjian > Date: Mon Jul 18 20:57:53 2005 +0000 > > \pset numericsep -> numericlocale. > > commit 8ddd22f2456af0155f9c183894f481203e86b76e > Author: Bruce Momjian > Date: Tue Sep 27 16:30:25 2005 +0000 > > Fix incorrect psql \x memory allocation for numericlocale. Redesign API > to be less error-prone. > > Obviously this was all a very long time ago. > > --------------------------------------------------------------------------- > > On Fri, Sep 25, 2015 at 04:01:33AM +0000, Tom Lane wrote: > > Further fix for psql's code for locale-aware formatting of numeric output. > > > > On closer inspection, those seemingly redundant atoi() calls were not so > > much inefficient as just plain wrong: the author of this code either had > > not read, or had not understood, the POSIX specification for localeconv(). > > The grouping field is *not* a textual digit string but separate integers > > encoded as chars. > > > > We'll follow the existing code as well as the backend's cash.c in only > > honoring the first group width, but let's at least honor it correctly. > > > > This doesn't actually result in any behavioral change in any of the > > locales I have installed on my Linux box, which may explain why nobody's > > complained; grouping width 3 is close enough to universal that it's barely > > worth considering other cases. Still, wrong is wrong, so back-patch. > > > > Branch > > ------ > > master > > > > Details > > ------- > > http://git.postgresql.org/pg/commitdiff/6325527d845b629243fb3f605af6747a7a4ac45f > > > > Modified Files > > -------------- > > src/bin/psql/print.c | 14 +++++++++++--- > > 1 file changed, 11 insertions(+), 3 deletions(-) > > > > > > -- > > Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) > > To make changes to your subscription: > > http://www.postgresql.org/mailpref/pgsql-committers > > -- > Bruce Momjian http://momjian.us > EnterpriseDB http://enterprisedb.com > > + As you are, so once was I. As I am, so you will be. + > + Roman grave inscription + > > > -- > Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-committers -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Roman grave inscription + -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers