Skip site navigation (1) Skip section navigation (2)

Re: reducing NUMERIC size for 9.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: reducing NUMERIC size for 9.1
Date: 2010-07-29 21:35:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)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 of
	int32 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

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2010-07-29 23:17:27
Subject: Re: ERROR: argument to pg_get_expr() must come from system catalogs
Previous:From: Vincenzo RomanoDate: 2010-07-29 21:30:00
Subject: Re: On Scalability

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group