"Dennis Gilmore" <[EMAIL PROTECTED]> writes: > errors test fails. the following is the output. which to me indicates it > passed but gave different output.
No, it failed. The code in question looks like this: int64 arg1 = PG_GETARG_INT64(0); int32 arg2 = PG_GETARG_INT32(1); int64 result; if (arg2 == 0) ereport(ERROR, (errcode(ERRCODE_DIVISION_BY_ZERO), errmsg("division by zero"))); result = arg1 / arg2; and the output you are showing indicates that the compiler thought it could rearrange the code so that the division was executed *despite* the protective test in front of it. IMHO, what you have here is a compiler bug, or at least the gcc boys are going to need to provide a damn good excuse why it's not. BTW, kindly revert the patch you inserted in the Fedora repository. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs