division by zero

From: Eric B(dot)Ridge <ebr(at)tcdi(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: division by zero
Date: 2003-03-07 18:48:46
Message-ID: 6D514366-50CD-11D7-B70C-0003937E3354@tcdi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2003-03-07 18:56:31 Re: pg_ctl -m fast failing?
Previous Message Tom Lane 2003-03-07 18:36:41 Re: Successful regression testing???

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-07 19:28:59 Re: I cant find it or I'm just lazy ?
Previous Message Bruce Momjian 2003-03-07 18:10:20 Re: Who puts the Windows binaries on the FTP server?