Re: [patch] pg_test_timing does not prompt illegal option - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [patch] pg_test_timing does not prompt illegal option
Date
Msg-id alpine.DEB.2.21.1904172205280.26370@lancre
Whole thread Raw
In response to Re: [patch] pg_test_timing does not prompt illegal option  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello Tom,

> We've generally felt that deferring to the behavior of the platform's
> getopt() or getopt_long() is a better idea than trying to enforce some
> lowest-common-denominator version of switch parsing, on the theory that
> users of a given platform will be used to whatever its getopt does.
> This does mean that we have undocumented behaviors on particular
> platforms.

Interesting.

> I'd say that accepting "--" is one of them.  Another example is that 
> glibc's getopt is willing to reorder the arguments, so that for example 
> this works for me:
>
> $ psql template1 -E
> psql (12devel)

Yep, I noticed that one by accident once.

> On other platforms that would not work, so we don't document it.

People might get surprised anyway, because the very same command may or 
may not work depending on the platform. Does not matter much, though.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: Status of the table access method work
Next
From: Alexander Korotkov
Date:
Subject: Re: jsonpath