Re: Reducing NUMERIC size for 8.3 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reducing NUMERIC size for 8.3
Date
Msg-id 14589.1190648720@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reducing NUMERIC size for 8.3  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Reducing NUMERIC size for 8.3
Re: Reducing NUMERIC size for 8.3
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> We previously discussed compressing the numeric data type for small values:
> http://archives.postgresql.org/pgsql-hackers/2007-06/msg00715.php

> We didn't do this for 8.3 but in any case Tom did suggest we ought to reverse
> the weight and sign/dscale so we could do this sometime without introducing
> another incompatibility.

I had forgotten about that, but it does seem like a good idea to do it now.
Any objections?

> I think we also should move the NumericData and declaration to numeric.c and
> make the Numeric type an opaque pointer for the rest of the source
> tree.

I don't agree with that; we are not in the habit of doing it that way
for any other on-disk data type.  All it will accomplish is to force
people to make private copies of the struct declaration, thereby
entirely guaranteeing that they fail to track changes.  There will
always be legitimate reasons for external code to want to look at
on-disk bits.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: stored procedure stats in collector
Next
From: Andrew Dunstan
Date:
Subject: Re: Bytea as C string in pg_convert?