Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jan 21, 2022 at 5:09 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> While we're on the subject of ill-chosen option syntax: "-cfast"
>> with non double dashes? Really? That's horribly ambiguous.
> I'm not sure whether you're complaining that we accept that syntax or
> using it, but AFAIK I'm responsible for neither. I think the syntax
> has been accepted since pg_basebackup was added in 2011, and Andres
> added it to this test case earlier this week (with -cfast in the
> subject line of the commit message).
pg_basebackup's help defines the syntax as
-c, --checkpoint=fast|spread
set fast or spread checkpointing
which I'd read as requiring a space (or possibly equal sign)
between "-c" and "fast". If it works as written in this test,
that's an accident of the particular getopt implementation,
and I'll bet it won't be too long before we come across
a getopt that doesn't like it.
regards, tom lane