Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f7jON-00075F-NR for pgsql-general@arkaria.postgresql.org; Sun, 15 Apr 2018 15:16:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f7jOM-0007b1-90 for pgsql-general@arkaria.postgresql.org; Sun, 15 Apr 2018 15:16:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f7jOM-0007as-0j for pgsql-general@lists.postgresql.org; Sun, 15 Apr 2018 15:16:34 +0000 Received: from [2001:41c9:1:41d::10] (helo=srv01.teladesign.ie) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f7jOI-0001QD-Gl for pgsql-general@lists.postgresql.org; Sun, 15 Apr 2018 15:16:33 +0000 Received: from [109.79.178.230] (helo=[192.168.1.134]) by srv01.teladesign.ie with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1f7jOA-0003cP-Qg; Sun, 15 Apr 2018 16:16:24 +0100 Reply-To: rod@iol.ie To: Ricardo Martin Gomez , James Keener , David Gauthier Cc: "pgsql-generallists.postgresql.org" References: From: Raymond O'Donnell Message-ID: Date: Sun, 15 Apr 2018 16:16:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 109.79.178.230 X-SA-Exim-Mail-From: rod@iol.ie Subject: Re: hardcode password in connect string X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on srv01.teladesign.ie); Unknown failure X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:41c9:1:41d::10 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 15/04/18 12:35, Ricardo Martin Gomez wrote: > Hello David, > I think so, the parameter you need in psql command is -w mipassword. Sorry, this is not correct. -w causes psql *never* to prompt for a password, and -W forces a password prompt. Neither allows the password to be passed as an argument - I don't think that this is possible with psql. Details here: https://www.postgresql.org/docs/10/static/app-psql.html Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie