On Wed, Jan 07, 2009 at 08:12:44PM +0530, Nikhil Sontakke wrote:
> Hi,
> 
> Consider the following with latest CVS sources:
> 
> postgres=# create table temp(val float4);
> CREATE TABLE
> postgres=# insert into temp values (415.1);
> INSERT 0 1
> postgres=# select * from temp where val = 415.1;
>  val
> -----
> (0 rows)
> 
> !?

No "!?" at all.  The "=" operation on floats has never been one to
count on.  If you need "=" not to give "surprising" results, you need
to use some other data type such as numeric.

Cheers,
David.
-- 
David Fetter <da...@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fet...@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to