aboutsummaryrefslogtreecommitdiff
path: root/contrib/jsonb_plperl/jsonb_plperl.control
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-07-26 11:59:00 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-07-26 11:59:00 -0400
commit01e0538e8b12591283835a2ff629428262684574 (patch)
treeb87c01760ab443cda7f1f3005dca9c863f54f3a7 /contrib/jsonb_plperl/jsonb_plperl.control
parentba2347a6d985afc19d4c8e8e84b16a28ed4df137 (diff)
downloadpostgresql-01e0538e8b12591283835a2ff629428262684574.tar.gz
postgresql-01e0538e8b12591283835a2ff629428262684574.zip
Fix loss of fractional digits for large values in cash_numeric().
Money values exceeding about 18 digits (depending on lc_monetary) could be inaccurately converted to numeric, due to select_div_scale() deciding it didn't need to compute any fractional digits. Force its hand by setting the dscale of one division input to equal the number of fractional digits we need. In passing, rearrange the logic to not do useless work in locales where money values are considered integral. Per bug #15925 from Slawomir Chodnicki. Back-patch to all supported branches. Discussion: https://postgr.es/m/15925-da9953e2674bb5c8@postgresql.org
Diffstat (limited to 'contrib/jsonb_plperl/jsonb_plperl.control')
0 files changed, 0 insertions, 0 deletions