Re: [HACKERS] Datatype MONEY - Mailing list pgsql-hackers

From wieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] Datatype MONEY
Date
Msg-id m11xW4C-0003kGC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] Datatype MONEY  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
Responses Re: [HACKERS] Datatype MONEY
List pgsql-hackers
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.

> 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).


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: Karel Zak - Zakkr
Date:
Subject: Re: [HACKERS] Datatype MONEY
Next
From: Karel Zak - Zakkr
Date:
Subject: Re: [HACKERS] Datatype MONEY