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 1jiPRm-0000U9-71 for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Jun 2020 21:36:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jiPRl-0005gp-1H for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Jun 2020 21:36:45 +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 1jiPRk-0005gi-RO for pgsql-bugs@lists.postgresql.org; Mon, 08 Jun 2020 21:36:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jiPRi-0003Jx-Aj for pgsql-bugs@lists.postgresql.org; Mon, 08 Jun 2020 21:36:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 058LadZq2090525; Mon, 8 Jun 2020 17:36:39 -0400 From: Tom Lane To: exclusion@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16486: Prompted password is ignored when password specified in connection string In-reply-to: <16486-b9c93d71c02c4907@postgresql.org> References: <16486-b9c93d71c02c4907@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 08 Jun 2020 19:00:06 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2090523.1591652199.1@sss.pgh.pa.us> Date: Mon, 08 Jun 2020 17:36:39 -0400 Message-ID: <2090524.1591652199@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form 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. regards, tom lane