From: Bruce Momjian <bruce@momjian.us>
To: Oleksandr Shulgin <oleksandr.shulgin@zalando.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: exclusion@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16486: Prompted password is ignored when password specified in connection string
Date: Wed, 2 Sep 2020 09:18:58 -0400
Message-ID: <20200902131858.GD13613@momjian.us> (raw)
In-Reply-To: <CACACo5RDv3ahJ_whCmMRRqc6Y6C5XVStJ-kC5JJgiZ5KM7TRFA@mail.gmail.com>
References: <16486-b9c93d71c02c4907@postgresql.org>
<2090524.1591652199@sss.pgh.pa.us>
<CAKFQuwbk=SDVVhe=P=eAsX4Zip_0tR+vZOOMM-VvHAH0=We=_g@mail.gmail.com>
<2110959.1591655226@sss.pgh.pa.us>
<2142411.1591667958@sss.pgh.pa.us>
<20200901203846.GA13613@momjian.us>
<CACACo5RDv3ahJ_whCmMRRqc6Y6C5XVStJ-kC5JJgiZ5KM7TRFA@mail.gmail.com>
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
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: bruce@momjian.us, oleksandr.shulgin@zalando.de, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16486: Prompted password is ignored when password specified in connection string
In-Reply-To: <20200902131858.GD13613@momjian.us>
* 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