Re: [PATCH] Remove unused #include's in src/backend/commands/* - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: [PATCH] Remove unused #include's in src/backend/commands/*
Date
Msg-id CAJ7c6TP1E5RcEbPLoM7bBpqfiscL1147CzTADDO1P9qt5ftJDQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Remove unused #include's in src/backend/commands/*  (Álvaro Herrera <alvherre@kurilemu.de>)
Responses Re: [PATCH] Remove unused #include's in src/backend/commands/*
List pgsql-hackers
Hi Álvaro,

> I wonder how many of these changes pass the compilation only because the
> header you're removing is indirectly being included via another header.
> In this particular case, it's because slot.h includes walreceiver.h
> which includes walsender.h, so this removal has no effect.

Hm.... on the flip side if the file is already included what's the
point in the second #include? It doesn't do anything and is redundant,
isn't it? At least my text editor highlights it as such (because
clangd tells it so). This is not a huge problem of course, just a bit
distracting.

If the idea is to always have an explicit list of all the includes (no
indirect ones) I think we may end up with pretty long lists, and I
don't instantly see value in this to be honest.

--
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: Add mode column to pg_stat_progress_vacuum
Next
From: Jacob Champion
Date:
Subject: Re: Thoughts on a "global" client configuration?