Re: [HACKERS] Datatype MONEY

Поиск
Список
Период
Сортировка
От Karel Zak - Zakkr
Тема Re: [HACKERS] Datatype MONEY
Дата
Msg-id Pine.LNX.3.96.991213150150.28438C-100000@ara.zf.jcu.cz
обсуждение исходный текст
Ответ на Re: [HACKERS] Datatype MONEY  (wieck@debis.com (Jan Wieck))
Ответы Re: [HACKERS] Datatype MONEY  (wieck@debis.com (Jan Wieck))
Список 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





В списке pgsql-hackers по дате отправления:

Предыдущее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] Datatype MONEY
Следующее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] generic LONG VARLENA