postgresql/src/backend
Tom Lane 44ccd11cbb 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
2018-04-29 15:21:45 -04:00
..
access Fix broken collation-aware searches in SP-GiST text opclass. 2018-04-16 16:06:47 -04:00
bootstrap Protect against multixact members wraparound 2015-04-28 11:32:53 -03:00
catalog Do not select new object OIDs that match recently-dead entries. 2018-04-11 17:41:27 -04:00
commands Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY. 2018-04-18 12:07:38 -04:00
executor Fix WHERE CURRENT OF when the referenced cursor uses an index-only scan. 2018-03-17 14:59:31 -04:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib Misc comment typo fixes. 2014-12-16 16:38:20 +02:00
libpq Fix some null pointer dereferences in LDAP auth code 2017-11-10 14:30:34 -05:00
main Install Windows crash dump handler before all else. 2017-11-12 14:31:04 -08:00
nodes Fix improper repetition of previous results from a hashed aggregate. 2016-08-24 14:37:51 -04:00
optimizer Change more places to be less trusting of RestrictInfo.is_pushed_down. 2018-04-20 15:19:17 -04:00
parser Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
po Translation updates 2018-02-05 12:45:45 -05:00
port Avoid depending on non-POSIX behavior of fcntl(2). 2017-04-21 15:55:56 -04:00
postmaster Make local copy of client hostnames in backend status array. 2018-04-11 23:40:27 +03:00
regex Fix regexport.c to behave sanely with lookaround constraints. 2017-04-13 17:18:35 -04:00
replication Refrain from duplicating data in reorderbuffers 2018-03-06 16:10:23 -03:00
rewrite Fix multiple assignments to a column of a domain type. 2017-07-11 16:48:59 -04:00
snowball Fix ancient encoding error in hungarian.stop. 2014-06-10 22:48:31 -04:00
storage Fix incorrect close() call in dsm_impl_mmap(). 2018-04-10 18:34:40 -04:00
tcop Unify SIGHUP handling between normal and walsender backends. 2017-06-05 19:18:16 -07:00
tsearch Fix bogus affix-merging code. 2018-04-12 18:39:51 -04:00
utils Avoid wrong results for power() with NaN input on some platforms. 2018-04-29 15:21:45 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
nls.mk Translation updates 2015-02-01 23:18:42 -05:00