11128.1 != 11128.1 - Mailing list pgsql-sql

From Radek Kanovsky
Subject 11128.1 != 11128.1
Date
Msg-id Pine.LNX.3.96.990925165406.18476r-100000@rk.uh.cz
Whole thread Raw
In response to Re: [SQL] pg_dumpall + psql -e template1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hi,

I have one table defined as follows:

CREATE TABLE bank ( .... incr FLOAT NOT NULL DEFAULT 0.0 , ....) ;

When I make query

SELECT * FROM bank WHERE incr = 11128.1;

it returns no result although at least one row satisfy this condition.
I can get result only with modified query

SELECT * FROM bank WHERE round(incr,1) = round(11128.1,1);

Is there some error in libc,OS or postgres? I have tried
to dump-destroy-create-restore whole database and
it looked good but after few hours I got into trouble again.

I run 6.5.1 version, compiled with gcc 2.95.1 (libc-2.1.2)
on Debian Linux 2.2.11.

Radek Kanovsky, rk@uh.cz



pgsql-sql by date:

Previous
From: Engard Ferenc
Date:
Subject: Re: [SQL] comparing 2 tables. . .
Next
From: Radek Kanovsky
Date:
Subject: create function(date,date,date,...)