Re: Bug #881: floor function returning double precision with integer arguments in 7.3, returns numeric in 7.2 with the same statement - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #881: floor function returning double precision with integer arguments in 7.3, returns numeric in 7.2 with the same statement
Date
Msg-id 24145.1043269551@sss.pgh.pa.us
Whole thread Raw
In response to Bug #881: floor function returning double precision with integer arguments in 7.3, returns numeric in 7.2 with the same statement  (pgsql-bugs@postgresql.org)
List pgsql-bugs
pgsql-bugs@postgresql.org writes:
> Return datatype of the floor function is different between PostgreSQL 7.2 and PostgreSQL 7.3 the documentation for
PostgreSQL7.3 states that PostgreSQL 7.3's floor function should return type numeric. In 7.3 it seems to be returning
thedouble precision datatype. Oracle 8.0.5 correctly executes the test statments along with PostgreSQL 7.2. (we have to
becompatible) 

> The documentation mentioned:
> http://www.postgresql.org/docs/view.php?version=7.3&file=functions-math.html

This table seems not to have been updated when we added float versions
of ceil(), floor(), and sign().  You won't get any support for ripping
them out again, though.  I suggest adding casts to the queries, or
possibly defining a version of mod() that takes float8.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Marcin Winkler
Date:
Subject: Re: Bug #878: different format of float values in 7.2.and
Next
From: Lamar Owen
Date:
Subject: Re: Unable to Install PostGreSQL on Red Hat Linux release 7.2