Search Postgresql Archives

Re: Casting numeric values to double

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel Schregenberger" <npfdd@xxxxxxx> writes:
> If I compare a field of type "numeric" to a small decimal constant like
> "3.6", the constant is interpreted as a "double precision" value and the
> comparison fails with the following message:
> # SELECT * FROM tr_table_okpx WHERE prating >= 3.6;
> Unable to identify an operator '>=' for types 'double precision' and
> 'numeric'
>         You will have to retype this query using an explicit cast

> I'm using Postgre 7.2, which might be a bit outdated but I could not find
> any information whether this behaviour has changed in newer versions.

More than "a bit" outdated, and yes it has.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux