| From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: [HACKERS] money data type and conversions] |
| Date: | 1999-06-23 19:53:10 |
| Message-ID: | 199906231953.PAA20660@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
| From | Date | Subject | |
|---|---|---|---|
| Next Message | D'Arcy J.M. Cain | 1999-06-23 20:54:12 | Re: [HACKERS] money data type and conversions] |
| Previous Message | D'Arcy J.M. Cain | 1999-06-23 19:24:18 | Re: [HACKERS] money data type and conversions |