Re: [HACKERS] Re: [QUESTIONS] money or dollar type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Re: [QUESTIONS] money or dollar type
Дата
Msg-id 5392.895080975@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [QUESTIONS] money or dollar type  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] Re: [QUESTIONS] money or dollar type  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> I have thought about this.  Just bitmask the 16-bits to two 8-bit
> quantities.  Give you max 256 length with 256 currencies.

Uh, no: what we were discussing was the total width and decimal place
position of exact numerics.  Probably, 255 numeric digits are enough
for practical purposes, so I don't feel an urgent need to make atttypmod
wider for this.  But if you want to make it 32 bits, that would
eliminate any concern --- we'd have room for 64k-digit numerics...

If we're going to associate currencies with the money datatype, the
currency needs to be part of the data, not part of the column type.
I need to be able to store amounts of different currencies in the same
column.  (Otherwise, a transaction log would need a separate column for
every possible currency, all but one of which would be null in any given
row.  Ick.)

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] mmap and MAP_ANON
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] mmap and MAP_ANON