Re: SELECT with REAL...

From: Philippe Ferreira <phil(dot)f(at)worldonline(dot)fr>
To: Steve Atkins <steve(at)blighty(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT with REAL...
Date: 2006-02-06 18:21:58
Message-ID: 43E793C6.9090802@worldonline.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> Comparing two floating point numbers for equality seldom works
> the way you want it to.
>
> Without seeing the exact data you have it's hard to say for sure (as
> there
> may be some other issue with what you're doing) but I wouldn't expect
> this to work with data from arbitrary sources.
>
> Try
>
> SELECT * FROM mytable WHERE myreal >= 10.49 AND myreal <= 10.51;
>
> and see what result that gives.
>
This way, it works...

Philippe Ferreira.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Philippe Ferreira 2006-02-06 18:32:53 Re: SELECT with REAL...
Previous Message Martijn van Oosterhout 2006-02-06 16:45:44 Re: ftp download won't work