summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2012-11-14 22:30:14 +0000
committerTom Lane2012-11-14 22:30:14 +0000
commit694f4ff83525c6e1b241b87d1b55cf1306fb91a4 (patch)
tree181712ac04208b3c6768441e9b5dc571443f105e /doc/src
parente405151b25f11dbd8bc716824ccc908ef21217da (diff)
Fix the int8 and int2 cases of (minimum possible integer) % (-1).
The correct answer for this (or any other case with arg2 = -1) is zero, but some machines throw a floating-point exception instead of behaving sanely. Commit f9ac414c35ea084ff70c564ab2c32adb06d5296f dealt with this in int4mod, but overlooked the fact that it also happens in int8mod (at least on my Linux x86_64 machine). Protect int2mod as well; it's not clear whether any machines fail there (mine does not) but since the test is so cheap it seems better safe than sorry. While at it, simplify the original guard in int4mod: we need only check for arg2 == -1, we don't need to check arg1 explicitly. Xi Wang, with some editing by me.
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions