Re: reducing NUMERIC size for 9.1 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: reducing NUMERIC size for 9.1
Date
Msg-id 20134.1280439307@sss.pgh.pa.us
Whole thread Raw
In response to Re: reducing NUMERIC size for 9.1  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: reducing NUMERIC size for 9.1
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Did you look at the
> patch to move the numeric stuff out of the .h file that I attached a
> few emails back?  If that looks OK, I can commit it and then redo the
> rest of this along the lines we've discussed.

A couple of thoughts:

* It'd be good to get NUMERIC_HDRSZ out of there too, especially since
it'll have only the shakiest connection to reality after this patch goes in.
It looks like doing that would only require modifying type_maximum_size().
I'd suggest inventing another small function along the lines ofint32 numeric_maximum_size(int32 typemod)
so that the NUMERIC-specific knowledge can be pulled out of format_type.c.

* I'd suggest leaving a comment along the lines of/* The actual contents of Numeric are private to numeric.c */
with the now-opaque typedef for Numeric.

Otherwise +1.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Vincenzo Romano
Date:
Subject: Re: On Scalability
Next
From: Tom Lane
Date:
Subject: Re: ERROR: argument to pg_get_expr() must come from system catalogs