Re: BUG #16486: Prompted password is ignored when password specified in connection string - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #16486: Prompted password is ignored when password specified in connection string
Date
Msg-id 20200902131858.GD13613@momjian.us
Whole thread Raw
In response to Re: BUG #16486: Prompted password is ignored when password specified in connection string  (Oleksandr Shulgin <oleksandr.shulgin@zalando.de>)
Responses Re: BUG #16486: Prompted password is ignored when password specified in connection string  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, Sep  2, 2020 at 09:54:37AM +0200, Oleksandr Shulgin wrote:
> On Tue, Sep 1, 2020 at 10:38 PM Bruce Momjian <bruce@momjian.us> wrote:
> 
> 
>     I used a later version of Tom's patch to add documentation of how
>     connection strings can override command-line options, plus it has the
>     password description improvements.
> 
>     I would like to apply this to all supported versions.
> 
> 
> Not related to the proposed change, this sentence is the same before and after,
> but makes me wonder:
> 
> > However, <application>psql</application>
>         will waste a connection attempt finding out that the server wants a
>         password.  In some cases it is worth typing <option>-W</option> to
> avoid
>         the extra connection attempt.
> 
> AFAIK, there is nothing in the protocol that forces psql to make an extra
> connection attempt.  If libpq provided a means to pass a password-prompt
> callback, no extra connection would be needed I think?

That is true.  I don't think we want the backend to be kept open waiting
for someone to type a password, which is why, I think, we don't do it
that way.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee




pgsql-bugs by date:

Previous
From: Jehan-Guillaume de Rorthais
Date:
Subject: Re: BUG #15285: Query used index over field with ICU collation in some cases wrongly return 0 rows
Next
From: Tom Lane
Date:
Subject: Re: BUG #16486: Prompted password is ignored when password specified in connection string