Re: unnecessary #include "pg_getopt.h"? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: unnecessary #include "pg_getopt.h"?
Date
Msg-id ZG8HOvrycUpz01vr@paquier.xyz
Whole thread Raw
In response to Re: unnecessary #include "pg_getopt.h"?  (Andres Freund <andres@anarazel.de>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
Next
From: Masahiko Sawada
Date:
Subject: Re: running logical replication as the subscription owner