Re: [HACKERS] money data type and conversions] - Mailing list pgsql-hackers

From D'Arcy" "J.M." Cain
Subject Re: [HACKERS] money data type and conversions]
Date
Msg-id m10wu28-0000bFC@druid.net
Whole thread Raw
In response to Re: [HACKERS] money data type and conversions]  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Thus spake Bruce Momjian
> 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?

That's another thought I had.  However, it isn't the '$' symbol.  The
idea is that it takes the symbol from the current locale.  That's what
makes handling the information so hard, you don't know how many characters
are used by the currency symbol.

However, cash_out and cash_words_out can probably be dropped into the
decimal code.  There should be some small changes though.  In particular
the money type moves the decimal point to a position in a fixed string
of digits but for decimal it should honour the type's positioning.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] money data type and conversions]
Next
From: Kristofer Munn
Date:
Subject: Perl 5 Interface on 6.5 and lo_creat/lo_open problem