pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Further fix for psql's code for locale-aware formatting of numer
Date: Sun, 4 Oct 2015 22:15:07 -0400
Message-ID: <20151005021507.GB6797@momjian.us> (raw)
In-Reply-To: <20151005015752.GA25308@momjian.us>
References: <E1ZfKCT-0006k4-5f@gemulon.postgresql.org>
	<20151005015752.GA25308@momjian.us>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>


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 <bruce@momjian.us>
> 	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 <bruce@momjian.us>
> 	Date:   Thu Jul 14 08:42:37 2005 +0000
> 	
> 	    Change numericsep to a boolean, and make it locale-aware.
> 
> 	commit bd157821649ae203b9c8ce8daf4ec027a0003351
> 	Author: Bruce Momjian <bruce@momjian.us>
> 	Date:   Thu Jul 14 21:12:41 2005 +0000
> 	
> 	    Enable multi-byte thousands_sep and decimal_point for numericsep.
> 
> 	commit 507465525e8c3e4ebf0159ac07c915dd609cd6b3
> 	Author: Bruce Momjian <bruce@momjian.us>
> 	Date:   Mon Jul 18 20:57:53 2005 +0000
> 	
> 	    \pset numericsep -> numericlocale.
> 
> 	commit 8ddd22f2456af0155f9c183894f481203e86b76e
> 	Author: Bruce Momjian <bruce@momjian.us>
> 	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  <bruce@momjian.us>        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  <bruce@momjian.us>        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



view thread (16+ messages)

Message-ID: <20151005021507.GB6797@momjian.us>
Permalink:  ../20151005021507.GB6797@momjian.us/
Also on:    postgresql.org/message-id/20151005021507.GB6797@momjian.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: bruce@momjian.us, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Further fix for psql's code for locale-aware formatting of numer
  In-Reply-To: <20151005021507.GB6797@momjian.us>
  References: <E1ZfKCT-0006k4-5f@gemulon.postgresql.org> <20151005015752.GA25308@momjian.us> <20151005021507.GB6797@momjian.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