Re: Ordering of header file inclusion

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Ordering of header file inclusion
Дата
Msg-id CAA4eK1LeRKpdgupkH6-DkAw0EHEe2r0M71pR-tFro=zrF6oQeQ@mail.gmail.com
обсуждение исходный текст
Ответ на Ordering of header file inclusion  (vignesh C <vignesh21@gmail.com>)
Ответы Re: Ordering of header file inclusion  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Oct 2, 2019 at 2:57 PM vignesh C <vignesh21@gmail.com> wrote:
>
> Hi,
>
> 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.   I think this will make an order of header inclusions consistent
throughout code.   One thing which will be slightly tricky is we might
not be able to back-patch this as some of this belongs to a recent
version(s) and others to older versions as well.   OTOH, I have not
investigated how much of this is relevant to back branches.  I think
most of these will apply to 12, but I am not sure if it is worth the
effort to segregate the changes which apply to back branches.  What do
you think?

 Few minor comments after a quick read:
 #include "lib/ilist.h"
-
+#include "miscadmin.h"

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

--- a/src/bin/psql/variables.c
+++ b/src/bin/psql/variables.c
@@ -8,10 +8,8 @@
 #include "postgres_fe.h"

 #include "common.h"
-#include "variables.h"
-
 #include "common/logging.h"
-
+#include "variables.h"

Same as above.


-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "ideriha.takeshi@fujitsu.com"
Дата:
Сообщение: RE: Global shared meta cache
Следующее
От: "imai.yoshikazu@fujitsu.com"
Дата:
Сообщение: RE: Wrong value in metapage of GIN INDEX.