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

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: [QUESTIONS] money or dollar type
Date: 1998-05-13 18:06:04
Message-ID: 199805131806.OAA23263@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)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.)

Yep, good point.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ocie 1998-05-13 18:38:42 Re: [HACKERS] mmap and MAP_ANON
Previous Message Bruce Momjian 1998-05-13 18:02:18 Re: [HACKERS] mmap and MAP_ANON