Re: windows psql connection error - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: windows psql connection error
Date
Msg-id YLl6H9lI2vBLuMPw@paquier.xyz
Whole thread Raw
In response to Re: windows psql connection error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: windows psql connection error
Next
From: PG Bug reporting form
Date:
Subject: BUG #17047: 502 ERROR The request could not be satisfied