Re: Bug #878: different format of float values in 7.2.and 7.3

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #878: different format of float values in 7.2.and 7.3
Дата
Msg-id 2964.1043075665@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug #878: different format of float values in 7.2.and 7.3  (pgsql-bugs@postgresql.org)
Ответы Re: Bug #878: different format of float values in 7.2.and  ("Denis N. Stepanov" <D.N.Stepanov@inp.nsk.su>)
Список 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 по дате отправления:

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #878: different format of float values in 7.2.and 7.3
Следующее
От: "Andrzej Kosmala"
Дата:
Сообщение: Re: "ERROR: Query-specified return tuple and actual function