Re: src/port/getopt_long.c lossy with arguments having no option characters - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: src/port/getopt_long.c lossy with arguments having no option characters
Date
Msg-id CAB7nPqSTsawDHgCVfLEtUpW7wMeu2sQXZDB5=5aOK-o+BBTc_Q@mail.gmail.com
Whole thread Raw
In response to Re: src/port/getopt_long.c lossy with arguments having no option characters  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: src/port/getopt_long.c lossy with arguments having no option characters  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Sat, Apr 4, 2015 at 4:47 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On 4/3/15 10:08 AM, Tom Lane wrote:
>> Michael Paquier <michael.paquier@gmail.com> writes:
>>> The implementation of getopt_long in src/port has some limitations,
>>> for example such commands do not work but they should:
>>
>> No, those should not work.  You're too used to versions that don't insist
>> on switches-before-non-switch-arguments.  Such behavior is an extension
>> that is not standard,
>
> It is true that options after non-option arguments are a GNU extension,
> but long options are also a GNU extension.  So the behavior we provide
> is neither pure POSIX nor pure GNU.  I can see how that would be confusing.

Well, OK. Then we had better update a bit the TAP tests of initdb and
createdb because they break on any platform which is not compliant
with that.
--
Michael

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #12950: Update problem
Next
From: Tom Lane
Date:
Subject: Re: src/port/getopt_long.c lossy with arguments having no option characters