From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | daveh(at)insightdist(dot)com (David Hartwig) |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Division by Zero |
Date: | 1998-04-14 17:04:48 |
Message-ID: | 199804141704.NAA25672@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> This is a multi-part message in MIME format.
> --------------0BE30DC54DE04265764E3F7C
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> I have noticed that when float types are divided by zero in a query, the
> the query aborts (via elog(WARN)) with a complaint about divide by zero.
>
> Also an integer divide by zero produces a result. On our AIX 4.1.4
> system 1 / 0 = 15. And 10 / 0 = 31. There is some pattern here with
> integers, but it is of little use.
On BSDI:
test=> select 1/0;
ERROR: floating point exception! The last floating point operation
either exceeded legal ranges or was a divide by zero
I think a transaction abort is the only normal solution.
--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
From | Date | Subject | |
---|---|---|---|
Next Message | Paul M. Aoki | 1998-04-14 22:25:47 | Re: [HACKERS] Safe/Fast I/O ... |
Previous Message | David Hartwig | 1998-04-14 16:09:24 | Division by Zero |