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

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, olly(at)lfix(dot)co(dot)uk, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: [QUESTIONS] money or dollar type
Date: 1998-05-12 16:54:09
Message-ID: 199805121654.MAA28694@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> The only other thing which would need to be handled is how to pass along
> the two value precision/scale parameters which are a part of the
> declaration for these types. I've just finished working on the type
> conversion algorithms so understand the current "atttypmod" field a bit
> better, but have not decided how to extend it to multiple fields.
>

I have thought about this. Just bitmask the 16-bits to two 8-bit
quantities. Give you max 256 length with 256 currencies.

The only place they are used is in the type-specific *.c function, so
you just us the mask there, or create a union of :8 and :8 and reference
it that way.

--
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 Bruce Momjian 1998-05-12 16:57:24 Re: [HACKERS] mmap and MAP_ANON
Previous Message Bruce Momjian 1998-05-12 16:50:14 Re: [HACKERS] mmap and MAP_ANON