Re: Reducing header interdependencies around heapam.h et al.
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Date: 2019-01-14T18:36:14Z
Lists: pgsql-hackers
0001 -- looks reasonable. One hunk in executor.h changes LockTupleMode to "enum LockTupleMode", but there's no need for that. AFAIK the only reason to have the struct FooBarData vs. FooBar (ptr) split is so that it's possible to refer to structs without having the full struct definition. I think changing uses of FooBar to "struct FooBarData *" defeats the whole purpose -- it becomes pointless noise, confusing the reader for no gain. I've long considered that the struct definitions should appear in "internal" headers (such as htup_details.h), separate from the pointer typedefs, so that it is the forward struct declarations (and the pointer typedefs, where there are any) that are part of the exposed API for each module, and not the struct definitions. I think that would be much more invasive, though, and it's unlikely to succeed as easily as this simpler approach is. I think MissingPtr is a terrible name. Can we change that while at this? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Don't include genam.h from execnodes.h and relscan.h anymore.
- 0944ec54de38 12.0 landed
-
Make naming of tupdesc related structs more consistent with the rest of PG.
- 774a975c9a59 12.0 landed
-
Remove too generically named MissingPtr typedef.
- e451dd552196 12.0 landed
-
Don't include heapam.h from others headers.
- 4c850ecec649 12.0 landed