Re: New version of money type - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: New version of money type
Date
Msg-id 20060917002948.GL6548@kenobi.snowman.net
Whole thread Raw
In response to Re: New version of money type  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
* Gregory Stark (stark@enterprisedb.com) wrote:
> In any case I think Jim was suggesting this be handled internally to the
> numeric data type which wouldn't cause this problem. However I'm not sure
> anything has to be done. A numeric is an array of 16 bit integers, so anything
> under 64k *is* stored just as an integer.

Right, which is fine, but for >64k (Actually, isn't it 10,000?),
operations could be done in 1 step using 64bit ints instead of in
multiple steps.  On systems with fast 64bit integer ops (quite a few of
them out there these days...) this seems likely to be an improvement in
performance.

Of course, there's the question of how much of an improvement, how
complicated it makes the code, backwards-compatibility issues, and what
to do about the binary in/out operations.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Mid cycle release?
Next
From: Tom Lane
Date:
Subject: Re: The enormous s->childXids problem