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

From Gregory Stark
Subject Re: Reducing NUMERIC size for 8.3
Date
Msg-id 87wsugngl3.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Reducing NUMERIC size for 8.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.com> writes:
>
>> 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.

Well the macros to do so would become quite a bit more complex. I imagine they
would become functions instead. I suppose a reasonable simple interface could
be ginned up. But anyone currently accessing the data directly would have to
go through the functions to access the bits.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: GUC variable renaming, redux
Next
From: Simon Riggs
Date:
Subject: Re: GUC variable renaming, redux