possible obvious bug?

Started by Merlin Moncureabout 23 years ago6 messages
#1Merlin Moncure
wizard_32141@yahoo.com

I was playing with the Japanese win32 7.2.1 port and I noticed that "select
0 / 0" caused the server to crash and restart. I understand that it is a
totally unsupported version, but it should be easy enough to check vs. the
current version. Note that select 0.0/0.0 worked fine!

Merlin

#2Mario Weilguni
mario.weilguni@icomedias.com
In reply to: Merlin Moncure (#1)
Re: possible obvious bug?

I was playing with the Japanese win32 7.2.1 port and I noticed that "select
0 / 0" caused the server to crash and restart. I understand that it is a
totally unsupported version, but it should be easy enough to check vs. the
current version. Note that select 0.0/0.0 worked fine!

Seems to work fine on my system.

postgres=# SELECT version();
version
---------------------------------------------------------------------
PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66
(1 row)

postgres=# SELECT 0/0;
ERROR: floating point exception! The last floating point operation either
exceeded legal ranges or was a divide by zero
postgres=#

#3Hannu Krosing
hannu@tm.ee
In reply to: Merlin Moncure (#1)
Re: possible obvious bug?

Merlin Moncure kirjutas T, 26.11.2002 kell 08:00:

I was playing with the Japanese win32 7.2.1 port and I noticed that "select
0 / 0" caused the server to crash and restart. I understand that it is a
totally unsupported version, but it should be easy enough to check vs. the
current version. Note that select 0.0/0.0 worked fine!

So what is the right answer ?

----------
Hannu

#4scott.marlowe
scott.marlowe@ihs.com
In reply to: Hannu Krosing (#3)
Re: possible obvious bug?

On 27 Nov 2002, Hannu Krosing wrote:

Merlin Moncure kirjutas T, 26.11.2002 kell 08:00:

I was playing with the Japanese win32 7.2.1 port and I noticed that "select
0 / 0" caused the server to crash and restart. I understand that it is a
totally unsupported version, but it should be easy enough to check vs. the
current version. Note that select 0.0/0.0 worked fine!

So what is the right answer ?

Maybe it's a locale oriented thing?

#5Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Merlin Moncure (#1)
Re: possible obvious bug?

Merlin Moncure kirjutas T, 26.11.2002 kell 08:00:

I was playing with the Japanese win32 7.2.1 port and I noticed that

"select

0 / 0" caused the server to crash and restart. I understand that it is

a

totally unsupported version, but it should be easy enough to check vs.

the

current version. Note that select 0.0/0.0 worked fine!

So what is the right answer ?

NaN :)

Chris

#6Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: scott.marlowe (#4)
Re: possible obvious bug?

Merlin Moncure kirjutas T, 26.11.2002 kell 08:00:

I was playing with the Japanese win32 7.2.1 port and I noticed that

"select

0 / 0" caused the server to crash and restart. I understand that it

is a

totally unsupported version, but it should be easy enough to check vs.

the

current version. Note that select 0.0/0.0 worked fine!

So what is the right answer ?

Maybe it's a locale oriented thing?

In 7.2.3 there seem to be two different messages:

usa=# select 0/0;
ERROR: floating point exception! The last floating point operation either
exceeded legal ranges or was a divide by zero
usa=# select 0/0.0;
ERROR: float8div: divide by zero error
usa=# select 0.0/0.0;
ERROR: float8div: divide by zero error
usa=# select 0.0/0;
ERROR: float8div: divide by zero error
usa=# select 1/0;
ERROR: floating point exception! The last floating point operation either
exceeded legal ranges or was a divide by zero
usa=# select 1/0.0;
ERROR: float8div: divide by zero error

Chris