Re: [HACKERS] Re: [QUESTIONS] money or dollar type - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: [QUESTIONS] money or dollar type
Date
Msg-id 199805121654.MAA28694@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: [QUESTIONS] money or dollar type  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
Responses Re: [HACKERS] Re: [QUESTIONS] money or dollar type
List 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@candle.pha.pa.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)

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] mmap and MAP_ANON
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] mmap and MAP_ANON