division by zero - Mailing list pgsql-general

From Eric B.Ridge
Subject division by zero
Date
Msg-id 6D514366-50CD-11D7-B70C-0003937E3354@tcdi.com
Whole thread Raw
Responses Re: division by zero
Re: division by zero
List pgsql-general
I admit, I suck at math, but I really thought postgres would ERROR on
this:

foo=# select 1/0;
  ?column?
----------
         0
(1 row)

More surprising is that this does ERROR:
foo=# select 1/0.0;
ERROR:  division by zero on numeric

Is this a bug, or do I need to go back to high school algebra?  "Both"
is an acceptable answer.  :)

eric


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Successful regression testing???
Next
From: Josh Berkus
Date:
Subject: Re: pg_ctl -m fast failing?