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 1qF45P-0007oW-NA for pgsql-general@arkaria.postgresql.org; Fri, 30 Jun 2023 02:42:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qF45N-00006q-Os for pgsql-general@arkaria.postgresql.org; Fri, 30 Jun 2023 02:42:13 +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 1qF45N-0008Vw-29 for pgsql-general@lists.postgresql.org; Fri, 30 Jun 2023 02:42:13 +0000 Received: from rs6162.luxsci.com ([162.142.76.255]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qF45G-001HJC-TI for pgsql-general@lists.postgresql.org; Fri, 30 Jun 2023 02:42:09 +0000 Received: from pfortin.com (h231.250.89.75.dynamic.ip.windstream.net [75.89.250.231]) (authenticated bits=0) by rs6162.luxsci.com (8.15.2/8.14.9) with ESMTPSA id 35U2g0Mg4149106 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 30 Jun 2023 02:42:01 GMT Date: Thu, 29 Jun 2023 22:42:00 -0400 From: pf@pfortin.com To: pgsql-general@lists.postgresql.org Subject: psql and pgpass.conf on Windows Message-ID: <20230629224200.080cc1a4.pfortin@pfortin.com> X-Mailer: Claws Mail 4.1.1git47 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Lux-Comment: Message 35U2g0Mg4149106 sent by user #22427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pfortin.com; h=date:from:to:subject:message-id:mime-version:content-type:content-transfer-encoding; s=dkim; bh=NLeeIaGfmdVWc1awcdUHmNvExlKbku05S0+PSU2xzas=; b=USq6oo6nAEmodP3mK2fyggO66hgBblbiXMNUmGg3iZ6Fpx0TTKU7rHLDPFy5Dtn7W6PvPjXXA2cFHT4X+ivE/VxSMnSKZJR6cUyCzrpWWGKuQnKJwc0hUHirSnaQhl2N+nvv/Tx8LJ9WQJ5WVkXgmpn/qM4A9zRXoLYtm/HeIQY= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Trying to write a script that will run on Linux, Windows, and Mac. The "standard" credentials file contains: hostname:port:database:username:password in: Linux: .pgpass Windows: %APPDATA%\postgresql\pgpass.conf Mac: (I'm not there yet...) On Linux, this works. However, on Windows, psql will not read pgpass.conf (tried in just about every location I could think of) Even: "set PGPASSFILE=" does not work. Finally, out of frustration, tried: set PGPASSWORD= and that got me past the password issue, only to now get: 'more' is not recognized as an internal or external command, operable program or batch file. Given the number of queries about pgpass.conf and finding no answer that works, is there no bug report on this? Thinking that psql was not adjusted for Windows, tried naming the file: .pgpass .pgpass.conf also in various locations to no avail... What am I (and all the others found in searches) missing? Or are there unresolved bugs in psql? - pgpass.conf - expecting external executable: 'more' Thanks, Pierre