Tweak the overflow checks in integer division functions to complain if the
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 5 Oct 2008 23:18:37 +0000 (23:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 5 Oct 2008 23:18:37 +0000 (23:18 +0000)
commit7d7a23a761e4bdf8d7d6ca0bd3d9c8f08942d84d
treee2e300ce61e2e52922d1ee8df59bb4c6db94aa51
parentd66fbe608c2476d631b5775a6cd4f00b7e301393
Tweak the overflow checks in integer division functions to complain if the
machine produces zero (rather than the more usual minimum-possible-integer)
for the only possible overflow case.  This has been seen to occur for at least
some word widths on some hardware, and it's cheap enough to check for
everywhere.  Per Peter's analysis of buildfarm reports.

This could be back-patched, but in the absence of any gripes from the field
I doubt it's worth the trouble.
src/backend/utils/adt/int.c
src/backend/utils/adt/int8.c