Saturday, May 10, 2008

Re: [HACKERS] bloated heapam.h

Alvaro Herrera <alvherre@commandprompt.com> writes:
> The one that makes a bit more sense is a new syncscan.h. And there are
> a lot of things in heapam.h that actually correspond to tuple
> manipulation (heap_form_tuple and so on), so perhaps a new header file
> would be appropriate, but there's already htup.h which contains
> tuple-related stuff.

After actually looking at the header a bit ...

+1 for moving fastgetattr, heap_getattr, and the heaptuple.c functions
to htup.h. I don't see any big gain from relocating the other stuff;
it seems to largely all use about the same set of typedefs.

It looks to me actually that a large part of your complaint is that
heapam.h #includes more than it has to. Have you tried just cutting its
#include list to the minimum needed to compile its function declarations?
Likely this would force more #includes in .c files but I don't object
to that. (I might be wrong, but I believe that Bruce's script for
removing "unnecessary" #includes is not bright enough to make such
tradeoffs, so it'd let bloated #include lists in headers survive.)

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: