Kenneth Marshall <ktm(at)is(dot)rice(dot)edu> writes:
> Here are the diffs for the regression test failures on Solaris 8.
> The tests work fine on Redhat9 and Redhat Enterprise Linux 3.
... and most other platforms ...
> select 1/0;
> ! ERROR: floating-point exception
> ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero.
This query would invoke the following code in int4div:
if (arg2 == 0)
ereport(ERROR,
(errcode(ERRCODE_DIVISION_BY_ZERO),
errmsg("division by zero")));
result = arg1 / arg2;
I suggest directing some strong words to your compiler vendor. If the
"if" test doesn't complete before the subsequent division causes a trap,
that is not our problem.
regards, tom lane