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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "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-03 19:05:38
Message-ID: 20200903190538.GA3248@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Sep 2, 2020 at 03:47:40PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > 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.
>
> > <option>--all</option>) is not used, the database name is read
> > from the environment variable <envar>PGDATABASE</envar>. If
> > that is not set, the user name specified for the connection is
> > - used.
> > + used. <link linkend="libpq-connstring">Connction strings</link>
> > + can also be used for connection specifications, and these can
> > + override other command-line options.
> > </para>
> > </listitem>
> > </varlistentry>
>
> * Spellcheck (not "Connction" please)
>
> * I do not like the wording "can override", because that's just impossibly
> vague. It leaves the reader wondering whether there are cases where that
> doesn't happen.
>
> I'd suggest wording more like
>
> The <replaceable>dbname</replaceable> can be a
> <link ...>connection string</link>. If so, connection parameters
> found in the connection string will override any conflicting command
> line options, such as <option>--username</option>.

Sure, makes sense. Updated patch attached.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

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

Attachment Content-Type Size
passwd.diff text/x-diff 11.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2020-09-04 01:20:13 Re: [BUG v13] Crash with event trigger in extension
Previous Message Tom Lane 2020-09-03 17:49:24