aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_util.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-09-24 23:01:04 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-09-24 23:01:04 -0400
commit348dd2847fa4a379e452ee00ab2016ec1629202d (patch)
treef4d22ee5727a016b73a3d5c3399f0cbd215a2e37 /src/backend/utils/adt/jsonb_util.c
parent0da864c53c6c4a84ed1cfa2cef2945df23196451 (diff)
downloadpostgresql-348dd2847fa4a379e452ee00ab2016ec1629202d.tar.gz
postgresql-348dd2847fa4a379e452ee00ab2016ec1629202d.zip
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.
Diffstat (limited to 'src/backend/utils/adt/jsonb_util.c')
0 files changed, 0 insertions, 0 deletions