pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Further fix for psql's code for locale-aware formatting of numer
16+ messages / 2 participants
[nested] [flat]
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 04:01 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 04:01 UTC (permalink / raw)
To: pgsql-committers
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
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/da4af91cefaabe493577f1d6d17ee78f2e66389c
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 04:01 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 04:01 UTC (permalink / raw)
To: pgsql-committers
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
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/c48623d8db8558036771e9ee0eeff132f8ea30f8
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 04:01 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 04:01 UTC (permalink / raw)
To: pgsql-committers
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
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/60617d7d680e46e45126baa98c6e20728300c893
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 04:01 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 04:01 UTC (permalink / raw)
To: pgsql-committers
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
------
REL9_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/9c547c939c6a23766797573431b574e2842abf9c
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 04:01 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 04:01 UTC (permalink / raw)
To: pgsql-committers
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
------
REL9_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/49917edadf9d787efbd71b7e1e689eb48c2a1c47
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 04:01 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 04:01 UTC (permalink / raw)
To: pgsql-committers
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
------
REL9_0_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/71763ecff64cecc78384ef44c720f6e95db05f31
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 04:01 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 16+ messages in thread
From: Tom Lane @ 2015-09-25 04:01 UTC (permalink / raw)
To: pgsql-committers
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 16:21 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 16:21 UTC (permalink / raw)
To: pgsql-committers
Further fix for psql's code for locale-aware formatting of numeric output.
(Third time's the charm, I hope.)
Additional testing disclosed that this code could mangle already-localized
output from the "money" datatype. We can't very easily skip applying it
to "money" values, because the logic is tied to column right-justification
and people expect "money" output to be right-justified. Short of
decoupling that, we can fix it in what should be a safe enough way by
testing to make sure the string doesn't contain any characters that would
not be expected in plain numeric output.
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/5eb7024379ec0701ce2fae242ae90d7d56ee72bb
Modified Files
--------------
src/bin/psql/print.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 16:21 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 16:21 UTC (permalink / raw)
To: pgsql-committers
Further fix for psql's code for locale-aware formatting of numeric output.
(Third time's the charm, I hope.)
Additional testing disclosed that this code could mangle already-localized
output from the "money" datatype. We can't very easily skip applying it
to "money" values, because the logic is tied to column right-justification
and people expect "money" output to be right-justified. Short of
decoupling that, we can fix it in what should be a safe enough way by
testing to make sure the string doesn't contain any characters that would
not be expected in plain numeric output.
Branch
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/f8864347670a9f837c83cde90366b2df72ab4a43
Modified Files
--------------
src/bin/psql/print.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 16:21 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 16:21 UTC (permalink / raw)
To: pgsql-committers
Further fix for psql's code for locale-aware formatting of numeric output.
(Third time's the charm, I hope.)
Additional testing disclosed that this code could mangle already-localized
output from the "money" datatype. We can't very easily skip applying it
to "money" values, because the logic is tied to column right-justification
and people expect "money" output to be right-justified. Short of
decoupling that, we can fix it in what should be a safe enough way by
testing to make sure the string doesn't contain any characters that would
not be expected in plain numeric output.
Branch
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/80fa5421017b23e992ae71676e424fc5d1acbed8
Modified Files
--------------
src/bin/psql/print.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 16:21 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 16:21 UTC (permalink / raw)
To: pgsql-committers
Further fix for psql's code for locale-aware formatting of numeric output.
(Third time's the charm, I hope.)
Additional testing disclosed that this code could mangle already-localized
output from the "money" datatype. We can't very easily skip applying it
to "money" values, because the logic is tied to column right-justification
and people expect "money" output to be right-justified. Short of
decoupling that, we can fix it in what should be a safe enough way by
testing to make sure the string doesn't contain any characters that would
not be expected in plain numeric output.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/77130fc1482f978629a16c8e956a5477a05d2c04
Modified Files
--------------
src/bin/psql/print.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 16:21 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 16:21 UTC (permalink / raw)
To: pgsql-committers
Further fix for psql's code for locale-aware formatting of numeric output.
(Third time's the charm, I hope.)
Additional testing disclosed that this code could mangle already-localized
output from the "money" datatype. We can't very easily skip applying it
to "money" values, because the logic is tied to column right-justification
and people expect "money" output to be right-justified. Short of
decoupling that, we can fix it in what should be a safe enough way by
testing to make sure the string doesn't contain any characters that would
not be expected in plain numeric output.
Branch
------
REL9_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/b7d17eca577e01ef50a5f5d09e42f6b271cceee1
Modified Files
--------------
src/bin/psql/print.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 16:21 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 16:21 UTC (permalink / raw)
To: pgsql-committers
Further fix for psql's code for locale-aware formatting of numeric output.
(Third time's the charm, I hope.)
Additional testing disclosed that this code could mangle already-localized
output from the "money" datatype. We can't very easily skip applying it
to "money" values, because the logic is tied to column right-justification
and people expect "money" output to be right-justified. Short of
decoupling that, we can fix it in what should be a safe enough way by
testing to make sure the string doesn't contain any characters that would
not be expected in plain numeric output.
Branch
------
REL9_0_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/98d8c75f9f15a3718214c2fbfda9919f3dcfd274
Modified Files
--------------
src/bin/psql/print.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 16+ messages in thread
* pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-09-25 16:21 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2015-09-25 16:21 UTC (permalink / raw)
To: pgsql-committers
Further fix for psql's code for locale-aware formatting of numeric output.
(Third time's the charm, I hope.)
Additional testing disclosed that this code could mangle already-localized
output from the "money" datatype. We can't very easily skip applying it
to "money" values, because the logic is tied to column right-justification
and people expect "money" output to be right-justified. Short of
decoupling that, we can fix it in what should be a safe enough way by
testing to make sure the string doesn't contain any characters that would
not be expected in plain numeric output.
Branch
------
REL9_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/c961f401b267facca469c83963eddef9227bf244
Modified Files
--------------
src/bin/psql/print.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-10-05 01:57 Bruce Momjian <bruce@momjian.us>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 16+ messages in thread
From: Bruce Momjian @ 2015-10-05 01:57 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: pgsql: Further fix for psql's code for locale-aware formatting of numer
@ 2015-10-05 02:15 Bruce Momjian <bruce@momjian.us>
parent: Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 16+ messages in thread
From: Bruce Momjian @ 2015-10-05 02:15 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-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
^ permalink raw reply [nested|flat] 16+ messages in thread
end of thread, other threads:[~2015-10-05 02:15 UTC | newest]
Thread overview: 16+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-09-25 04:01 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-10-05 01:57 ` Bruce Momjian <bruce@momjian.us>
2015-10-05 02:15 ` Bruce Momjian <bruce@momjian.us>
2015-09-25 04:01 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 04:01 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 04:01 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 04:01 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 04:01 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 04:01 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 16:21 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 16:21 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 16:21 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 16:21 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 16:21 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 16:21 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
2015-09-25 16:21 pgsql: Further fix for psql's code for locale-aware formatting of numer Tom Lane <tgl@sss.pgh.pa.us>
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