On 10/5/05 9:08 AM, "Robert Osowiecki" <[EMAIL PROTECTED]> wrote:

> Hello!
> 
> Anyone could explain to me, why cast(3.33 to int) works (from float, I
> suppose)  but cast('3.33' to int) (from text) does not? And what if I
> create a cast for that: is it possibly dangerous?

How about:

sdavis=# select (('3.33')::float)::int;
 int4 
------
    3
(1 row)

Sean


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to