From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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-06-08 22:08:48 |
Message-ID: | CAKFQuwbk=SDVVhe=P=eAsX4Zip_0tR+vZOOMM-VvHAH0=We=_g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Jun 8, 2020 at 2:36 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> > Assuming that we have the user u1 with the password p1, the following
> > command:
> > psql -U u1 'dbname=postgres password=p1' -W
> > prompts for a password but the input password is effectively ignored.
>
> The entire point of the -W switch is that it prompts whether or not
> the password is going to be used for anything. If you don't like that,
> don't use -W.
>
A more intuitive interpretation of -W is that it prompts for a password,
regardless of valid values being provided by other configuration, and uses
that password exclusively to attempt to connect to the server.
The documentation doesn't actually say which one of those two
interpretations is correct.
And regardless of which interpretation is intended the OP seems to
demonstrate that either interpretation is reality depending on
which combination of configuration sources provide the non-prompted
password. That inconsistency seems undesirable.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-06-08 22:27:06 | Re: BUG #16486: Prompted password is ignored when password specified in connection string |
Previous Message | Tom Lane | 2020-06-08 21:41:00 | Re: BUG #16487: EXPLAIN produces JSON with duplicate "Workers" arrays |