Re: real or float4 '=' operator is broken in 7.1.2

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: real or float4 '=' operator is broken in 7.1.2
Дата
Msg-id Pine.BSF.4.21.0107241037220.68755-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на real or float4 '=' operator is broken in 7.1.2  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
More information to add to this bug.
I get the same behavior as the original poster, but the following on these
queries:

sszabo=> select myfloat-29.92 from "test_f4";
       ?column?
----------------------
 7.62939436071974e-08
 7.62939436071974e-08
(2 rows)
sszabo=> select myfloat-'29.92' from "test_f4";
 ?column?
----------
        0
        0
(2 rows)

This is probably due to the float constant being made
a float8 since I also see the following:
sszabo=> select 29.92::float4-29.92::float8;
       ?column?
----------------------
 7.62939436071974e-08
(1 row)


On Tue, 24 Jul 2001 pgsql-bugs@postgresql.org wrote:

> CREATE TABLE "test_r" ("key" serial, "myfloat" real);
> CREATE TABLE "test_f" ("key" serial, "myfloat" float8);
> CREATE TABLE "test_f4" ("key" serial, "myfloat" float4);
> INSERT INTO "test_r" ("myfloat") values ('29.92');
> INSERT INTO "test_r" ("myfloat") values (29.92);
> INSERT INTO "test_f" ("myfloat") values ('29.92');
> INSERT INTO "test_f" ("myfloat") values (29.92);
> INSERT INTO "test_f4" ("myfloat") values ('29.92');
> INSERT INTO "test_f4" ("myfloat") values (29.92);

В списке pgsql-bugs по дате отправления:

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: real or float4 '=' operator is broken in 7.1.2
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: insert of date is wrong