On Mon, 13 Dec 1999, Jan Wieck wrote:
> Karel Zak - Zakkr wrote:
> >
> > IMHO is good use for money a float type.
>
> In some countries (Germany at least) storage of financial
> booking information is not permitted to use floats. And you
> aren't allowed to use it for calculation of taxes etc.,
> instead you must use some datatype with a fixable number of
> digits after the decimal point.
>
> Thus, only our NUMERIC/DECIMAL type or int4/8 and using the
> 'V' (IIRC) format specifier in to_char() should be used.
Hmm, interesting.. but it is not problem for to_char(), it is problem
(how number datetype choise) for users.
To_char() formatting numbers by course of format-picture (second arg.)
only - total all is user choise (how set format), and to_char() not check
if country form allow to use fixet/notfixet digits after the decimal point
(in locales is not information about it, or yes?).
I take back my previous "IMHO".
But if you use to_char(444.555, '999.99'), output is always with two digits
after the decimal point and our country form is pleased ... I agree, it is
only output option, internaly is still problem if you will calculate with
float.
Or is other idea for to_char() money formatting and how datetype must be
supported (I plan float4/8 int4/8 now)?
(note: 'V' format specifier is multiplier and return a value as 10^n).
Karel