Re: Ordering of header file inclusion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Ordering of header file inclusion
Date: 2019-10-20 04:53:57
Message-ID: 18272.1571547237@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-10-20 08:01:09 Re: Remove obsolete information schema tables
Previous Message Euler Taveira 2019-10-19 22:23:36 Re: Add a GUC variable that control logical replication