Re: windows psql connection error

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: long Allen <zl19881003(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: windows psql connection error
Date: 2021-06-04 00:55:59
Message-ID: YLl6H9lI2vBLuMPw@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jun 03, 2021 at 10:01:54AM -0400, Tom Lane wrote:
> long Allen <zl19881003(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2021-06-04 01:09:56 Re: BUG #16079: Question Regarding the BUG #16064
Previous Message Adrian Klaver 2021-06-03 21:37:16 Re: BUG #17046: Upgrade postgres 11 to 13 version