Re: Ordering of header file inclusion

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Kuntal Ghosh <kuntalghosh.2007@gmail.com>, 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-11-12T01:03:40Z
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 →
  1. Make the order of the header file includes consistent.

  2. Make the order of the header file includes consistent in backend modules.

  3. Make the order of the header file includes consistent in non-backend modules.

  4. Make the order of the header file includes consistent in contrib modules.

Attachments

On Mon, Nov 11, 2019 at 11:36 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Sun, Nov 10, 2019 at 5:30 PM vignesh C <vignesh21@gmail.com> wrote:
> >
> [review_latest_patch]:
>
> Do we want to consider the ordering of map file inclusions as well
> (see the changes pointed out below)?  If so, what all we should
> validate, is compilation of these modules sufficient?  Tom, anyone, do
> you have any opinion on this?
>

Even I don't know how to validate the above changes by some test
application, other than by compiling.

> 1.
>  utf8_and_cyrillic.c
>
>  #include "fmgr.h"
>  #include "mb/pg_wchar.h"
> -#include "../../Unicode/utf8_to_koi8r.map"
>  #include "../../Unicode/koi8r_to_utf8.map"
> -#include "../../Unicode/utf8_to_koi8u.map"
>  #include "../../Unicode/koi8u_to_utf8.map"
> +#include "../../Unicode/utf8_to_koi8r.map"
> +#include "../../Unicode/utf8_to_koi8u.map"
>
>  PG_MODULE_MAGIC;
>
> 2.
> utf8_and_iso8859.c
> ..
>  #include "../../Unicode/iso8859_13_to_utf8.map"
>  #include "../../Unicode/iso8859_14_to_utf8.map"
>  #include "../../Unicode/iso8859_15_to_utf8.map"
> +#include "../../Unicode/iso8859_16_to_utf8.map"
>  #include "../../Unicode/iso8859_2_to_utf8.map"
>  #include "../../Unicode/iso8859_3_to_utf8.map"
>  #include "../../Unicode/iso8859_4_to_utf8.map"
> @@ -39,7 +41,6 @@
>  #include "../../Unicode/utf8_to_iso8859_7.map"
>  #include "../../Unicode/utf8_to_iso8859_8.map"
>  #include "../../Unicode/utf8_to_iso8859_9.map"
> -#include "../../Unicode/iso8859_16_to_utf8.map"
>

Thanks Amit for your comments. Please find the updated patch which
does not include the changes mentioned above. I will post a separate
patch for these changes based on the response from others.

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com