> is the type casting done automaticly? how? can i have an influence of
> the cast order? is there an easy way to doing the rounding?
bf2=# select 1 / 2 from dual;
?column?
----------
0
(1 row)
bf2=# select 1::float / 2 from dual;
?column?
----------
0.5
(1 row)
bf2=# select (1::float / 2)::int from dual;
?column?
----------
0
(1 row)
Also you have the functions round, floor, and ceil, which do what you would
expect.
-Jonathan
- [SQL] numeric conversions? Bruno Boettcher
- [SQL] pgpl-problem, what's wrong with my loop? Jonathan Ellis
- [SQL] pgpl-problem, what's wrong with my loop? Bruno Boettcher
- Re: [SQL] pgpl-problem, what's wrong with my... Tom Lane
- Re: [SQL] pgpl-problem, what's wrong with my... Kovacs Zoltan Sandor
- Re: [SQL] pgpl-problem, what's wrong wit... Bruno Boettcher
- Re: [SQL] pgpl-problem, what's wrong... Kovacs Zoltan Sandor
