Re: Ordering of header file inclusion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Ordering of header file inclusion
Date
Msg-id 18272.1571547237@sss.pgh.pa.us
Whole thread Raw
In response to Re: Ordering of header file inclusion  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-10-19 21:50:03 +0200, Peter Eisentraut wrote:
>> This class of change I don't like.
>> The existing arrangement keeps "other" header files separate from the
>> header file of the module itself.  It seems useful to keep that separate.

> If we were to do so, we ought to put bloom.h first and clearly seperated
> out, not last, as the former makes the bug of the the header not being
> standalone more obvious.

We have headerscheck and cpluspluscheck to catch that problem, so I don't
think that it needs to be a reason not to rationalize header inclusion
order.

I don't have a very strong opinion on whether modules outside the core
backend should separate their own headers from core-system headers.
I think there's some argument for that, but it's not something we've
done consistently.  And, as you say, there's no convention as to
where we'd include local headers if we do separate them.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: Re: Add a GUC variable that control logical replication
Next
From: Peter Eisentraut
Date:
Subject: Re: Remove obsolete information schema tables