Re: [GENERAL] division by zero

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] division by zero
Date: 2003-03-10 22:32:52
Message-ID: 20030310142035.S32669-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 10 Mar 2003, Tom Lane wrote:

> "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> writes:
> > The only other solution is a #ifdef win32 around places that potentially
> > use integers in the divisor and do some nasty hacking.
>
> Well, it seems to me that we have two different issues to worry about:
>
> 1. There are only about half a dozen places for a user-triggered
> division by zero to occur (the div and mod functions for int2, int4,
> int8; have I missed anything?). It would not be very painful to insert

It's unlikely to come up in practice, but chardiv as well for "char".

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-10 22:35:04 Re: [GENERAL] division by zero
Previous Message Merlin Moncure 2003-03-10 22:18:00 Re: [INTERFACES] Roadmap for FE/BE protocol redesign