Re: Bug #878: different format of float values in 7.2.and 7.3 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #878: different format of float values in 7.2.and 7.3
Date
Msg-id 2964.1043075665@sss.pgh.pa.us
Whole thread Raw
In response to Bug #878: different format of float values in 7.2.and 7.3  (pgsql-bugs@postgresql.org)
Responses Re: Bug #878: different format of float values in 7.2.and  ("Denis N. Stepanov" <D.N.Stepanov@inp.nsk.su>)
List pgsql-bugs
pgsql-bugs@postgresql.org writes:
> The following line:
> SELECT 1875/1000.0
> produces different results. In 7.2.3 it is:
>       ?column?
> ---------------------
>        1.875

> while in 7.3.1 it is:
>       ?column?
> ---------------------
>  1.87500000000000000

The above expression is taken as NUMERIC datatype in 7.3, rather than
FLOAT8 as it was in 7.2.  To get the same output as before, try
    SELECT 1875/1000.0::float8;

            regards, tom lane

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #878: different format of float values in 7.2.and 7.3
Next
From: "Andrzej Kosmala"
Date:
Subject: Re: "ERROR: Query-specified return tuple and actual function