Re: [HACKERS] Datatype MONEY

From: Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz>
To: Jan Wieck <wieck(at)debis(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Datatype MONEY
Date: 1999-12-13 14:14:32
Message-ID: Pine.LNX.3.96.991213150150.28438C-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:
> >
> > On Mon, 13 Dec 1999, Jan Wieck wrote:
> >
> > > In some countries (Germany at least) storage of financial
> > > booking information is not permitted to use floats. And you
> >
> > Hmm, interesting.. but it is not problem for to_char(), it is problem
> > (how number datetype choise) for users.
>
> But it is subject for what would happen in the expression
> first if you have both, to_char(float8, text) and
> to_char(numeric, text) available and execute a query with
> to_char(444.55, '9999.99').
>
> If the parser could choose to read in the value as float8 and
> pass that to to_char(float8, text), the system would not be
> compliant to financial software requirements in Germany.

Hmm, it is very firm in Germany (or in EU?) if not allow to use float
in financ. software, I must ask about it how is it in Czech. Thank for
interesting information :-)

> > Or is other idea for to_char() money formatting and how datetype must be
> > supported (I plan float4/8 int4/8 now)?
>
> You should at least add NUMERIC to possible inputs. Otherwise
> there would be no chance than to convert it to float8,
> possibly loosing significant digits (and becoming not
> compliant as to above).
>

Well, on a datetype is depend only small part in to_char(), I try
write to_char(numeric, text) version. But I must first explore
NUMERIC datetupe... (documentation is quiet for this).

Thank Jan for suggestion.

Karel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 1999-12-13 14:26:39 Re: [HACKERS] Datatype MONEY
Previous Message Jan Wieck 1999-12-13 14:03:08 Re: [HACKERS] Datatype MONEY