Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-03-27 Thread Gregory Stark
Bruce Momjian [EMAIL PROTECTED] writes: Greg, do you want to submit a patch for this or add a TODO item for this? Well I never got any approval or rejection in principle so I don't know if such a patch would be accepted even if it were implemented reasonably. If it has the consensus needed to

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-03-27 Thread Heikki Linnakangas
Gregory Stark wrote: The main design issue is that I was proposing to make it impossible to access the internals of the numeric storage using macros. Currently some of the data (the sign, dscale, and weight) is visible without having to call any special numeric functions. I was proposing to use

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-03-26 Thread Bruce Momjian
Greg, do you want to submit a patch for this or add a TODO item for this? --- Gregory Stark wrote: I've uploaded a quick hack to store numerics in 8 bytes when possible.

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-03-02 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Patric Bechtel [EMAIL PROTECTED] writes: Tom Lane schrieb am 02.03.2007 14:38: Exact decimal fractions are no longer exact when converted to base 2. I think multiplying with base 10 until it's a whole number, then saving that exponent with it, that's how I

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-03-01 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: If we stored the digits in base 2 with a base 10 exponent would it really be too hard to output the digits? Exact decimal fractions are no longer exact when converted to base 2. regards, tom lane ---(end

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-03-01 Thread Patric Bechtel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane schrieb am 02.03.2007 14:38: Gregory Stark [EMAIL PROTECTED] writes: If we stored the digits in base 2 with a base 10 exponent would it really be too hard to output the digits? Exact decimal fractions are no longer exact when converted

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-03-01 Thread Tom Lane
Patric Bechtel [EMAIL PROTECTED] writes: Tom Lane schrieb am 02.03.2007 14:38: Exact decimal fractions are no longer exact when converted to base 2. I think multiplying with base 10 until it's a whole number, then saving that exponent with it, that's how I understood it. That hardly seems

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-02-28 Thread Gregory Stark
Patric Bechtel [EMAIL PROTECTED] writes: Maybe you want to have a look here: http://www2.hursley.ibm.com/decimal/DPDecimal.html Well we're not really looking for the optimal packing in general. All the problems here have to do with convenience in the implementation rather than the problems

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-02-28 Thread Patric Bechtel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregory Stark schrieb am 01.03.2007 10:23: Patric Bechtel [EMAIL PROTECTED] writes: Maybe you want to have a look here: http://www2.hursley.ibm.com/decimal/DPDecimal.html Well we're not really looking for the optimal packing in general. All the

Re: [PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-02-28 Thread Patric Bechtel
Michael Glaesemann schrieb am 01.03.2007 12:41: On Mar 1, 2007, at 12:32 , Patric Bechtel wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregory Stark schrieb am 01.03.2007 10:23: Patric Bechtel [EMAIL PROTECTED] writes: Maybe you want to have a look here:

[PATCHES] Numeric patch to add special-case representations for 8 bytes

2007-02-26 Thread Gregory Stark
I've uploaded a quick hack to store numerics in 8 bytes when possible. http://community.enterprisedb.com/numeric-hack-1.patch This is a bit of a kludge since it doesn't actually provide any interface for external clients of the numeric module to parse the resulting data. Ie, the macros in