Re: float to int - Mailing list pgsql-general

From Lew
Subject Re: float to int
Date
Msg-id 4oSdncE2-KHjMqXanZ2dnUVZ_ufinZ2d@comcast.com
Whole thread Raw
In response to Re: float to int  (Edoardo Panfili <edoardo@aspix.it>)
List pgsql-general
Edoardo Panfili wrote:
> Charles.Hou ha scritto:
>> how can i get the int value using the sql language? like this,
>>
>> "select cost from my_money_table " , the data type of cost is float.
>>
> take a look at
> http://www.postgresql.org/docs/8.2/static/sql-expressions.html
> CAST ( expression AS type )
> expression::type

Incidentally, float is about the worst data type to represent monetary amounts
that one can choose.

--
Lew

pgsql-general by date:

Previous
From: Lew
Date:
Subject: Re: update record with two-column primary key
Next
From: Lew
Date:
Subject: Re: Query Performance Test