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