Xi Wang <xi(dot)wang(at)gmail(dot)com> writes:
> Return 0 for INT_MIN % -1 (64-bit) instead of throwing an exception.
> This patch complements commit f9ac414c that fixed int4mod().
Meh. I didn't care for the explicit dependency on INT_MIN in the
previous patch, and I like introducing INT64_MIN even less. I think
we should be able to reduce the test to just
if (arg2 == -1)
return 0;
since zero is the correct result for any value of arg1, not only
INT_MIN.
regards, tom lane