Re: BUG #3387: mod on non-integer returns bad result - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3387: mod on non-integer returns bad result
Date
Msg-id 3249.1181916950@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3387: mod on non-integer returns bad result  ("Filip Krska" <filip.krska@comstar.cz>)
Responses Re: BUG #3387: mod on non-integer returns bad result  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-bugs
"Filip Krska" <filip.krska@comstar.cz> writes:
> select mod (70.0,70) from dual;
> returns
> 70.0
> instead of
> 0.0

PG 8.0 gets this right.  I think this demonstrates that Bruce's 8.1 patch
http://archives.postgresql.org/pgsql-committers/2005-06/msg00045.php
didn't actually fix anything, merely move the failure cases around.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Filip Krska"
Date:
Subject: BUG #3387: mod on non-integer returns bad result
Next
From: Gregory Stark
Date:
Subject: Re: BUG #3387: mod on non-integer returns bad result