Re: Reducing NUMERIC size for 8.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing NUMERIC size for 8.3
Date: 2007-09-24 15:45:20
Message-ID: 14589.1190648720@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-09-24 16:01:47 Re: Bytea as C string in pg_convert?
Previous Message Tom Lane 2007-09-24 15:36:56 Re: stored procedure stats in collector