numeric conversions? - Mailing list pgsql-sql

From Bruno Boettcher
Subject numeric conversions?
Date
Msg-id 20001120165133.D25191@erm1.u-strasbg.fr
Whole thread Raw
Responses pgpl-problem, what's wrong with my loop?
List pgsql-sql
Hello,

me again :(
i just ran into another problem....
didn't found it neither in the doc nor in the FAQ.....

the currencies conversion factors i use are stored as float4 in a table,
the values to apply on are stores as int4 ....

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?

the operation i want to do is something along this line:

int4 = ((int4) float4 * (float4)int4 +.5);


-- 
ciao bboett
==============================================================
bboett@earthling.net
http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett
===============================================================
the total amount of intelligence on earth is constant.
human population is growing....


pgsql-sql by date:

Previous
From: Bruno Boettcher
Date:
Subject: Re: More stupid questions: prettyprinting of ints??
Next
From: "Shane McEneaney"
Date:
Subject: Return number of rows update in query