Regarding the order of the header file includes

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Regarding the order of the header file includes
Date: 2024-03-06 09:32:31
Message-ID: CAMbWs4-WhpCFMbXCjtJ+FzmjfPrp7Hw1pk4p+ZpU95Kh3ofZ1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I think we generally follow the rule that we include 'postgres.h' or
'postgres_fe.h' first, followed by system header files, and then
postgres header files ordered in ASCII value. I noticed that in some C
files we fail to follow this rule strictly. Attached is a patch to fix
this.

Back in 2019, we performed the same operation in commits 7e735035f2,
dddf4cdc33, and 14aec03502. It appears that the code has deviated from
that point onwards.

Please note that this patch only addresses the order of header file
includes in backend modules (and might not be thorough). It is possible
that other modules may have a similar issue, but I have not evaluated
them yet.

Thanks
Richard

Attachment Content-Type Size
v1-0001-Make-the-order-of-the-header-file-includes-consistent-in-backend-modules.patch application/octet-stream 22.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-03-06 09:54:28 Re: pipe_read_line for reading arbitrary strings
Previous Message Jelte Fennema-Nio 2024-03-06 09:32:01 Re: Hooking into ExplainOneQuery() complicated by missing standard_ExplainOneQuery