Re: [PATCH] Fix missing argument handling in psql getopt

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Quentin Rameau <quinq(at)fifth(dot)space>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Fix missing argument handling in psql getopt
Date: 2019-08-25 19:28:12
Message-ID: 31439.1566761292@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Quentin Rameau <quinq(at)fifth(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Quentin Rameau 2019-08-25 19:45:27 Re: [PATCH] Fix missing argument handling in psql getopt
Previous Message Quentin Rameau 2019-08-25 19:21:36 Re: [PATCH] Fix missing argument handling in psql getopt