Is there something wrong with datatype float8 ???

From: Ana Roizen <aroizen(at)sinectis(dot)com(dot)ar>
To: "pgsql-sql(at)hub(dot)org" <pgsql-sql(at)hub(dot)org>
Subject: Is there something wrong with datatype float8 ???
Date: 2000-01-07 17:00:59
Message-ID: 38761BCA.6A931576@sinectis.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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???

Browse pgsql-sql by date

  From Date Subject
Next Message Werner Fraga 2000-01-07 19:19:02 Re: [SQL] datetime fields have '60' in seconds field
Previous Message Vladimir Terziev 2000-01-07 15:56:45 Re: [SQL] Serial field starting at 100 ?