On Tue, Aug 14, 2012 at 08:38:44AM -0400, Robert Haas wrote:
> On Mon, Aug 13, 2012 at 11:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > That would depend on how many places there are where SIGFPE is expected.
> > Are we sure there are any? Maybe we should just remove the handler and
> > let SIGFPE be treated as a core dump.
>
> No clue. According to Wikipedia, it is commonly caused by dividing by
> zero, or by dividing by INT_MIN by -1, resulting in a quotient out of
> range for the type. I'd be willing to bet that we have got all the
> division-by-zero cases patched up just because we try pretty hard to
> emit the right error message for such cases, but I'm a lot less
> certain that things like INT_MIN/-1 can't happen anywhere.
[local] test=# select -9223372036854775808/-1;
ERROR: floating-point exception