From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: long Allen <zl19881003@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: windows psql connection error
Date: Fri, 4 Jun 2021 09:55:59 +0900
Message-ID: <YLl6H9lI2vBLuMPw@paquier.xyz> (raw)
In-Reply-To: <272708.1622728914@sss.pgh.pa.us>
References: <CAFDvuBruAEAtB47Urh8w81GSRpoXczF8xT8BnZdDnmWWNsBUYQ@mail.gmail.com>
<272708.1622728914@sss.pgh.pa.us>
On Thu, Jun 03, 2021 at 10:01:54AM -0400, Tom Lane wrote:
> long Allen <zl19881003@gmail.com> writes:
> > When I execute commands "psql postgres -p 5433" in Windows, the system
> > reported an error “"extra command-line argument **** ignored“.
>
> We do not document nor support writing switches (i.e. "-p 5433") after
> non-switch arguments. Some versions of getopt_long make that magically
> work anyway, but others do not.
Just to bring in a bit more context.. Any code compiled with MSVC on
Windows would use the fallback implementation of getopt_long() in
src/port/getopt_long.c, which only supports the case where the extra
argument is at the end of the command.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, zl19881003@gmail.com
Subject: Re: windows psql connection error
In-Reply-To: <YLl6H9lI2vBLuMPw@paquier.xyz>
References: <CAFDvuBruAEAtB47Urh8w81GSRpoXczF8xT8BnZdDnmWWNsBUYQ@mail.gmail.com> <272708.1622728914@sss.pgh.pa.us> <YLl6H9lI2vBLuMPw@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox