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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: allan(at)pacificwebworks(dot)com, pgsql-bugs(at)postgresql(dot)org
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: 2003-01-22 21:05:51
Message-ID: 24145.1043269551@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)org writes:
> Return datatype of the floor function is different between PostgreSQL 7.2 and PostgreSQL 7.3 the documentation for PostgreSQL 7.3 states that PostgreSQL 7.3's floor function should return type numeric. In 7.3 it seems to be returning the double precision datatype. Oracle 8.0.5 correctly executes the test statments along with PostgreSQL 7.2. (we have to be compatible)

> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Lamar Owen 2003-01-22 21:20:57 Re: Unable to Install PostGreSQL on Red Hat Linux release 7.2
Previous Message pgsql-bugs 2003-01-22 19:41:39 Bug #881: floor function returning double precision with integer arguments in 7.3, returns numeric in 7.2 with the same statement