Re: unnecessary #include "pg_getopt.h"?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: unnecessary #include "pg_getopt.h"?
Дата
Msg-id ZG8HOvrycUpz01vr@paquier.xyz
обсуждение исходный текст
Ответ на Re: unnecessary #include "pg_getopt.h"?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Tue, May 23, 2023 at 06:37:59PM -0700, Andres Freund wrote:
> This feels more like a matter of taste to me than anything.

Yup, it is.

> At least some of
> the files touched in the patch use optarg, opterr etc. - which are declared in
> pg_getopt.h. Making it reasonable to directly include pg_getopt.h.

getopt_long.h is included in 21 places of src/bin/, with all of them
touching optarg, while only four of them include pg_getopt.h.  So
removing them as suggested makes sense.  I agree with the tasting
matter as well, still there is also a consistency matter.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: running logical replication as the subscription owner