Re: BUG #16486: Prompted password is ignored when password specified in connection string

From: Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, exclusion(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16486: Prompted password is ignored when password specified in connection string
Date: 2020-09-02 07:54:37
Message-ID: CACACo5RDv3ahJ_whCmMRRqc6Y6C5XVStJ-kC5JJgiZ5KM7TRFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Sep 1, 2020 at 10:38 PM Bruce Momjian <bruce(at)momjian(dot)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?

Regards,
--
Alex

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Matthias van de Meent 2020-09-02 10:43:56 Re: BUG #16586: deduplicate_items=true can be configured for numeric indexes
Previous Message Adarshdeep Cheema 2020-09-02 02:21:45 RE: BUG #16557: getProcedureColumns() function returns columns, when there is no existing Stored Procedure in the DB