Re: [HACKERS] money data type and conversions]

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] money data type and conversions]
Дата
Msg-id 199906231953.PAA20660@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] money data type and conversions  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Ответы Re: [HACKERS] money data type and conversions]
Re: [HACKERS] money data type and conversions]
Список pgsql-hackers
> Thus spake Bruce Momjian
> > > Well, can't explain the why's...
> > > 
> > > But I have the code to add to cash.c and cash.h to add the conversion 
> > > functions, but still have to figure out how to get PostgreSQL to recognize 
> > > it...   Guessing... it's in fmgrtab.c right?
> > > 
> > 
> > Duane, sonds like people want to remove the Money/cash type and transfer
> > everyone over to decimal which has full precision and is much better for
> > currency.
> 
> Is there any reason why we don't just leave money in?  I know that NUMERIC
> and DECIMAL will handle money amounts but the money type does a few
> extra things related to locale, even if we remove the currency symbol
> and perhaps we should leave that in if people are expected to use the
> new types.  It also determines whether the comma or period is the correct
> separator, puts separators in the correct place and determines where the
> decimal point goes.  Also, check out what the following does.
> 
>     select cash_words_out('157.23');
> 
> Althugh there appears to be a bug in that function that chops the last
> character from the output.

Maybe we will have to add '$' symbols to a special case of the numeric
type, or add a function to output numeric in money format?

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: "D'Arcy" "J.M." Cain
Дата:
Сообщение: Re: [HACKERS] money data type and conversions
Следующее
От: "D'Arcy" "J.M." Cain
Дата:
Сообщение: Re: [HACKERS] money data type and conversions]