Re: autogenerating headers & bki stuff - Mailing list pgsql-hackers

From Greg Stark
Subject Re: autogenerating headers & bki stuff
Date
Msg-id 407d949e0907251457x9318b28l415bc06605ca92a0@mail.gmail.com
Whole thread Raw
In response to Re: autogenerating headers & bki stuff  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: autogenerating headers & bki stuff
List pgsql-hackers
On Sat, Jul 25, 2009 at 9:17 PM, Robert Haas<robertmhaas@gmail.com> wrote:
> Of course, fixing the Anum and
> Natts declarations does not come close to fixing this problem: for
> catalogs that are initialized with any data at bootstrap time, the
> DATA() lines are a much bigger issue, but fixing that is going to
> require a bigger hammer than can be put in place with one patch.  I do
> think this is a pretty good foundation on which to build, though.


I think addressing that would actually be fairly simple in theory.
Move a lot of those DATA lines to SQL initdb scripts. Virtually all of
pg_proc, pg_operator, pg_opclass, pg_opfamily, pg_cast, etc can be
initialized using SQL. Hardly any of the records in there are needed
for bootstrapping.

That would reduce the pain of editing this files *enormously*. The
worst part of adding new operators is making sure all the opclass
entries line up properly. And when there's an OID conflict and they
all have to be renumbered and the opclasses fixed up that's when
they're a real headache.



--
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: visibility maps and heap_prune
Next
From: Tom Lane
Date:
Subject: Re: Patch for 8.5, transformationHook