Re: Ordering of header file inclusion
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Andres Freund <andres@anarazel.de>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-10-23T04:53:05Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Make the order of the header file includes consistent.
- e0487223ecac 13.0 landed
-
Make the order of the header file includes consistent in backend modules.
- 14aec0350230 13.0 landed
-
Make the order of the header file includes consistent in non-backend modules.
- dddf4cdc3300 13.0 landed
-
Make the order of the header file includes consistent in contrib modules.
- 7e735035f208 13.0 landed
Attachments
- 0001-Make-the-order-of-the-header-file-includes-consisten.patch (application/octet-stream) patch 0001
- 0002-Make-the-order-of-the-header-file-includes-consisten.patch (application/octet-stream) patch 0002
On Tue, Oct 22, 2019 at 3:41 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Oct 22, 2019 at 12:56 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > On Mon, Oct 21, 2019 at 11:04 PM vignesh C <vignesh21@gmail.com> wrote:
> > >
> > > On Mon, Oct 21, 2019 at 8:47 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> This patch series has broadly changed the code to organize the header
> includes in alphabetic order. It also makes sure that all files first
> includes 'postgres.h'/'postgres_fe.h', system header includes and then
> Postgres header includes.
>
> It also has a change where it seems that for local header includes, we
> have used '<>' whereas quotes ("") should have been used. See,
> ecpg/compatlib/informix.c.
>
> I am planning to commit this as multiple commits (a. contrib modules,
> b. non-backend changes and c. backend changes) as there is some risk
> of buildfarm break. From my side, I will ensure that everything is
> passing on windows and centos. Any objections to this plan?
>
Attached are patches for (a) and (b) after another round of review and
fixes by Vignesh. I am planning to commit the first one (a) tomorrow
morning and then if everything is fine on buildfarm, I will commit the
second one (b) and once both are good, I will look into the third one
(c). Another pair of eyes on these patches would be good.
Just to be clear, the basic rule we follow here is to always first
include 'postgres.h' or 'postgres_fe.h' whichever is applicable, then
system header includes and then Postgres header includes. In this, we
also follow that all the Postgres header includes are in order based
on their ASCII value. We generally follow these rules, but the code
has deviated in many places. These commits make these rules
consistent for the entire code.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com