>
> Now I try the same command with a different 'real' field:
> db02=# select distinct arm from ellipse where ellipse_ratio = 1.8;
> arm
> -----
> (0 rows)
>
> BUT, if I put the value in quotes (as if it were a string), I get:
>
> db02=# select distinct arm from ellipse where ellipse_ratio = '1.8';
> arm
> -----
> L
> R
> (2 rows)
>
> which is correct.
The reason is that in the first, the 1.8 is treated as double precision
which is slightly different than the 1.8 as real (you can see this with
a select 1.8::real-1.8;). I think the second postpones deciding the type
and gets converted into a 1.8 as real.