aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-04-29 15:21:44 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-04-29 15:21:44 -0400
commit4d864de486d63b50b1ba74330021504d2c674c23 (patch)
tree2102637489250b92f4f6433b7c683634111f7f92 /src/backend/access/transam/xlog.c
parent706b86bd4354d48a62e21953b2aaf258f90307c3 (diff)
downloadpostgresql-4d864de486d63b50b1ba74330021504d2c674c23.tar.gz
postgresql-4d864de486d63b50b1ba74330021504d2c674c23.zip
Avoid wrong results for power() with NaN input on some platforms.
Per spec, the result of power() should be NaN if either input is NaN. It appears that on some versions of Windows, the libc function does return NaN, but it also sets errno = EDOM, confusing our code that attempts to work around shortcomings of other platforms. Hence, add guard tests to avoid substituting a wrong result for the right one. It's been like this for a long time (and the odd behavior only appears in older MSVC releases, too) so back-patch to all supported branches. Dang Minh Huong, reviewed by David Rowley Discussion: https://postgr.es/m/75DB81BEEA95B445AE6D576A0A5C9E936A73E741@BPXM05GP.gisp.nec.co.jp
Diffstat (limited to 'src/backend/access/transam/xlog.c')
0 files changed, 0 insertions, 0 deletions