Is there something wrong with datatype float8 ??? - Mailing list pgsql-sql

From Ana Roizen
Subject Is there something wrong with datatype float8 ???
Date
Msg-id 38761BCA.6A931576@sinectis.com.ar
Whole thread Raw
List pgsql-sql
Hello!
Please, can anyone explain me why this query doesn't work?
I'm using Postgres 6.51 on Linux(RedHat).
Thanks a lot!!   Ana Roizen   Bs.As. -Argentina

#--I create my table and insert some values
mydb=> create table sum (x  float8,y  float8);
CREATE
mydb=> insert into sum (x,y)values(6.5,113.21);
INSERT 40453062 1

#--this works fine!
mydb=> select x+y from sum;
?column?
-------- 173.71
(1 row)

#--this doesn't work!!!!
mydb=> select * from sum where x+y=173.71;
x|y
-+-
(0 rows)

mydb=> select * from sum where x+y<173.71;  x|     y
----+------
60.5|113.21
(1 row)

What is going wrong???



pgsql-sql by date:

Previous
From: Vladimir Terziev
Date:
Subject: Re: [SQL] Serial field starting at 100 ?
Next
From: Werner Fraga
Date:
Subject: Re: [SQL] datetime fields have '60' in seconds field