Re: Ordering of header file inclusion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Ordering of header file inclusion
Date: 2019-10-08 14:49:36
Message-ID: 20279.1570546176@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
> On Wed, Oct 2, 2019 at 2:57 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>> I noticed that some of the header files inclusion is not ordered as
>> per the usual standard that is followed.
>> The attached patch contains the fix for the order in which the header
>> files are included.
>> Let me know your thoughts on the same.

> +1.

FWIW, I'm not on board with reordering system-header inclusions.
Some platforms have (had?) ordering dependencies for those, and where
that's true, it's seldom alphabetical. It's only our own headers
where we can safely expect that any arbitrary order will work.

> I think we shouldn't remove the extra line as part of the above change.

I would take out the blank lines between our own #includes. Those are
totally arbitrary and unnecessary. The whole point of style rules like
this one is to reduce the differences between the way one person might
write something and the way that someone else might. Deciding to throw
in a blank line is surely in the realm of unnecessary differences.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2019-10-08 15:48:09 Re: Standby accepts recovery_target_timeline setting?
Previous Message Stephen Frost 2019-10-08 14:08:22 Re: pg_upgrade fails with non-standard ACL