From: | Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | Jan Wieck <wieck(at)debis(dot)com> |
Cc: | meskes(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Datatype MONEY |
Date: | 1999-12-13 13:37:44 |
Message-ID: | Pine.LNX.3.96.991213133558.28438A-100000@ara.zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas SB | 1999-12-13 13:42:46 | Re: [HACKERS] generic LONG VARLENA |
Previous Message | Mike Mascari | 1999-12-13 13:03:43 | Is something wrong here? |