Re: Reducing header interdependencies around heapam.h et al. - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Reducing header interdependencies around heapam.h et al.
Date
Msg-id 201901141836.oxtm4uzc63j3@alvherre.pgsql
Whole thread Raw
In response to Re: Reducing header interdependencies around heapam.h et al.  (Andres Freund <andres@anarazel.de>)
Responses Re: Reducing header interdependencies around heapam.h et al.  (Andres Freund <andres@anarazel.de>)
List 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


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Next
From: Dimitri Fontaine
Date:
Subject: Re: Prepare Transaction support for ON COMMIT DROP temporary tables