Skip site navigation (1) Skip section navigation (2)

Re: BUG #3387: mod on non-integer returns bad result

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Filip Krska" <filip(dot)krska(at)comstar(dot)cz>
Cc: pgsql-bugs(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: BUG #3387: mod on non-integer returns bad result
Date: 2007-06-15 14:15:50
Message-ID: 3249.1181916950@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Filip Krska" <filip(dot)krska(at)comstar(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-06-15 15:42:04
Subject: Re: BUG #3387: mod on non-integer returns bad result
Previous:From: Filip KrskaDate: 2007-06-15 12:53:14
Subject: BUG #3387: mod on non-integer returns bad result

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group