Oleg Bartunov <[EMAIL PROTECTED]> writes:

> May be I miss something, but seems there is a problem with float4
> in 7.2.3 and 7.3RC1 (6.53 works fine):
> 
> test=# create table t ( a float4);
> CREATE TABLE
> test=# insert into t values (0.1);
> INSERT 32789 1
> test=# select * from t where a=0.1;
>  a
> ---
> (0 rows)


I'm guessing this is because 0.1 is not directly representable as a
binary floating point number, and literal floating constants are
float8 not float4, and 0.1::float4 != 0.1::float8.  Same problem that
causes queries on int2 fields not to use an index unless you cast the
constants in the query...

-Doug

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to