pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix psql's code for locale-aware formatting of numeric output. 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix psql's code for locale-aware formatting of numeric output. @ 2015-09-25 03:01 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-25 03:01 UTC (permalink / raw) To: pgsql-committers Fix psql's code for locale-aware formatting of numeric output. This code did the wrong thing entirely for numbers with an exponent but no decimal point (e.g., '1e6'), as reported by Jeff Janes in bug #13636. More generally, it made lots of unverified assumptions about what the input string could possibly look like. Rearrange so that it only fools with leading digits that it's directly verified are there, and an immediately adjacent decimal point. While at it, get rid of some useless inefficiencies, like converting the grouping count string to integer over and over (and over). This has been broken for a long time, so back-patch to all supported branches. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/4778a0bdaac3cb8eeb89acb585fd913783d80c4b Modified Files -------------- src/bin/psql/print.c | 103 +++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 56 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] 7+ messages in thread
* pgsql: Fix psql's code for locale-aware formatting of numeric output. @ 2015-09-25 03:01 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-25 03:01 UTC (permalink / raw) To: pgsql-committers Fix psql's code for locale-aware formatting of numeric output. This code did the wrong thing entirely for numbers with an exponent but no decimal point (e.g., '1e6'), as reported by Jeff Janes in bug #13636. More generally, it made lots of unverified assumptions about what the input string could possibly look like. Rearrange so that it only fools with leading digits that it's directly verified are there, and an immediately adjacent decimal point. While at it, get rid of some useless inefficiencies, like converting the grouping count string to integer over and over (and over). This has been broken for a long time, so back-patch to all supported branches. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f1ee153dcf1a3bd64889f56bee6a863f54e97d99 Modified Files -------------- src/bin/psql/print.c | 103 +++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 56 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] 7+ messages in thread
* pgsql: Fix psql's code for locale-aware formatting of numeric output. @ 2015-09-25 03:01 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-25 03:01 UTC (permalink / raw) To: pgsql-committers Fix psql's code for locale-aware formatting of numeric output. This code did the wrong thing entirely for numbers with an exponent but no decimal point (e.g., '1e6'), as reported by Jeff Janes in bug #13636. More generally, it made lots of unverified assumptions about what the input string could possibly look like. Rearrange so that it only fools with leading digits that it's directly verified are there, and an immediately adjacent decimal point. While at it, get rid of some useless inefficiencies, like converting the grouping count string to integer over and over (and over). This has been broken for a long time, so back-patch to all supported branches. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/348dd2847fa4a379e452ee00ab2016ec1629202d Modified Files -------------- src/bin/psql/print.c | 103 +++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 56 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] 7+ messages in thread
* pgsql: Fix psql's code for locale-aware formatting of numeric output. @ 2015-09-25 03:01 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-25 03:01 UTC (permalink / raw) To: pgsql-committers Fix psql's code for locale-aware formatting of numeric output. This code did the wrong thing entirely for numbers with an exponent but no decimal point (e.g., '1e6'), as reported by Jeff Janes in bug #13636. More generally, it made lots of unverified assumptions about what the input string could possibly look like. Rearrange so that it only fools with leading digits that it's directly verified are there, and an immediately adjacent decimal point. While at it, get rid of some useless inefficiencies, like converting the grouping count string to integer over and over (and over). This has been broken for a long time, so back-patch to all supported branches. Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/7e327ecd2b4e4ded1c4375a085bdf34e08885ee6 Modified Files -------------- src/bin/psql/print.c | 102 ++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 57 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] 7+ messages in thread
* pgsql: Fix psql's code for locale-aware formatting of numeric output. @ 2015-09-25 03:01 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-25 03:01 UTC (permalink / raw) To: pgsql-committers Fix psql's code for locale-aware formatting of numeric output. This code did the wrong thing entirely for numbers with an exponent but no decimal point (e.g., '1e6'), as reported by Jeff Janes in bug #13636. More generally, it made lots of unverified assumptions about what the input string could possibly look like. Rearrange so that it only fools with leading digits that it's directly verified are there, and an immediately adjacent decimal point. While at it, get rid of some useless inefficiencies, like converting the grouping count string to integer over and over (and over). This has been broken for a long time, so back-patch to all supported branches. Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/596c9e9efdbef0b0a597f3c8df478e51a50729e3 Modified Files -------------- src/bin/psql/print.c | 103 ++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 58 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] 7+ messages in thread
* pgsql: Fix psql's code for locale-aware formatting of numeric output. @ 2015-09-25 03:01 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-25 03:01 UTC (permalink / raw) To: pgsql-committers Fix psql's code for locale-aware formatting of numeric output. This code did the wrong thing entirely for numbers with an exponent but no decimal point (e.g., '1e6'), as reported by Jeff Janes in bug #13636. More generally, it made lots of unverified assumptions about what the input string could possibly look like. Rearrange so that it only fools with leading digits that it's directly verified are there, and an immediately adjacent decimal point. While at it, get rid of some useless inefficiencies, like converting the grouping count string to integer over and over (and over). This has been broken for a long time, so back-patch to all supported branches. Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/7ddadacec4ddea5d0b2e7452ec7adccd015c3bb6 Modified Files -------------- src/bin/psql/print.c | 103 ++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 58 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] 7+ messages in thread
* pgsql: Fix psql's code for locale-aware formatting of numeric output. @ 2015-09-25 03:01 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-25 03:01 UTC (permalink / raw) To: pgsql-committers Fix psql's code for locale-aware formatting of numeric output. This code did the wrong thing entirely for numbers with an exponent but no decimal point (e.g., '1e6'), as reported by Jeff Janes in bug #13636. More generally, it made lots of unverified assumptions about what the input string could possibly look like. Rearrange so that it only fools with leading digits that it's directly verified are there, and an immediately adjacent decimal point. While at it, get rid of some useless inefficiencies, like converting the grouping count string to integer over and over (and over). This has been broken for a long time, so back-patch to all supported branches. Branch ------ REL9_0_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/c2d6ef14eba72468458517249d8b0c0df5507918 Modified Files -------------- src/bin/psql/print.c | 103 ++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 58 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] 7+ messages in thread
end of thread, other threads:[~2015-09-25 03:01 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-09-25 03:01 pgsql: Fix psql's code for locale-aware formatting of numeric output. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-25 03:01 pgsql: Fix psql's code for locale-aware formatting of numeric output. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-25 03:01 pgsql: Fix psql's code for locale-aware formatting of numeric output. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-25 03:01 pgsql: Fix psql's code for locale-aware formatting of numeric output. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-25 03:01 pgsql: Fix psql's code for locale-aware formatting of numeric output. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-25 03:01 pgsql: Fix psql's code for locale-aware formatting of numeric output. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-25 03:01 pgsql: Fix psql's code for locale-aware formatting of numeric output. 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