Re: [PATCH] Fix missing argument handling in psql getopt - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Fix missing argument handling in psql getopt
Date
Msg-id 31439.1566761292@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Fix missing argument handling in psql getopt  (Quentin Rameau <quinq@fifth.space>)
Responses Re: [PATCH] Fix missing argument handling in psql getopt
List pgsql-hackers
Quentin Rameau <quinq@fifth.space> writes:
> Another better way, I think, to fix this is to check for optopt
> instead, which would be set to the option which caused the error, which
> if empty means there isn't an error.

Meh.  We don't use optopt at all today, and I don't especially want
to start doing so.  A patch that's trying to remove a platform
dependency (which is what this is, pedantic arguments that musl can
read POSIX better than anyone else notwithstanding) should not do
so by introducing hazards of new platform dependencies.

I've pushed your original patch (with some comment-tweaking).
It seems unlikely to break anything.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Quentin Rameau
Date:
Subject: Re: [PATCH] Fix missing argument handling in psql getopt
Next
From: Quentin Rameau
Date:
Subject: Re: [PATCH] Fix missing argument handling in psql getopt