Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOXCb-00015H-C0 for pgsql-bugs@arkaria.postgresql.org; Sat, 03 Oct 2020 02:23:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kOXCX-0002Bk-Ju for pgsql-bugs@arkaria.postgresql.org; Sat, 03 Oct 2020 02:23:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOX9W-0007ZO-MH for pgsql-bugs@lists.postgresql.org; Sat, 03 Oct 2020 02:20:02 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOX9U-0002HV-6V for pgsql-bugs@lists.postgresql.org; Sat, 03 Oct 2020 02:20:02 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kOX9S-00077g-De; Fri, 02 Oct 2020 22:19:58 -0400 Date: Fri, 2 Oct 2020 22:19:58 -0400 From: Bruce Momjian To: Tom Lane Cc: "David G. Johnston" , exclusion@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #16486: Prompted password is ignored when password specified in connection string Message-ID: <20201003021958.GC17425@momjian.us> References: <16486-b9c93d71c02c4907@postgresql.org> <2090524.1591652199@sss.pgh.pa.us> <2110959.1591655226@sss.pgh.pa.us> <2142411.1591667958@sss.pgh.pa.us> <20200901203846.GA13613@momjian.us> <428207.1599076060@sss.pgh.pa.us> <20200903190538.GA3248@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200903190538.GA3248@momjian.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Sep 3, 2020 at 03:05:38PM -0400, Bruce Momjian wrote: > On Wed, Sep 2, 2020 at 03:47:40PM -0400, Tom Lane wrote: > > Bruce Momjian 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. > > > > > ) is not used, the database name is read > > > from the environment variable PGDATABASE. If > > > that is not set, the user name specified for the connection is > > > - used. > > > + used. Connction strings > > > + can also be used for connection specifications, and these can > > > + override other command-line options. > > > > > > > > > > > > > * 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 dbname can be a > > connection string. If so, connection parameters > > found in the connection string will override any conflicting command > > line options, such as . > > Sure, makes sense. Updated patch attached. Patch applied to all supported versions; thanks for the report. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee