Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9E9F-000fNt-RG for pgsql-admin@arkaria.postgresql.org; Tue, 21 May 2024 01:18:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s9E9F-006PaQ-NE for pgsql-admin@arkaria.postgresql.org; Tue, 21 May 2024 01:18:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9E9F-006PaI-1o for pgsql-admin@lists.postgresql.org; Tue, 21 May 2024 01:18:37 +0000 Received: from mout-u-107.mailbox.org ([80.241.59.207]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9E93-001HX3-Fh for pgsql-admin@lists.postgresql.org; Tue, 21 May 2024 01:18:36 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4VjxQJ2N7mz9sjr; Tue, 21 May 2024 03:18:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1716254296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T1zLdILy9Huh4PtH3pSBNo+QRZ5LY6i65b7En36ujBk=; b=o5YiyPcgmh0nle5+EKzmsfr+MrI6p8GtQ5kJtAKyoSgPFvTHqzoyg1hXaglB2MYbs/h5rp yNKulzpRy0YyGofRI1Yo3GGEwKXWkweDMg9Cac2LRWnYGVmX/ygL0BuNeTqsMs0wGLstlE 5Qfm3znduhFE9sIHYd4KSu7ZW6DI1VTQ+Df3PnEJYKZoAVfKM6L2t79AYM+hiNF87HW9i3 9lEuSyOPaK9alOK6krrEkWRjafNrrn+PfiMETENGDEuVtcbjo0sT/XjFUsFtARYIj26NT/ mpjEjJnz/nT08a4ds8tQX2Te9sZ44XKaS0j8YaCegONqqj250xTtxFYvtrdEpA== Date: Tue, 21 May 2024 03:18:14 +0200 From: Erik Wienhold To: Ron Johnson Cc: Pgsql-admin Subject: Re: Comments in .pgpass file... Message-ID: <45ce11f5-52bc-47d7-bb95-e1ba5725b72b@ewie.name> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-05-21 03:01 +0200, Ron Johnson wrote: > It seems that psql (or maybe libpq) doesn't like trailing comments. > > This works: > 10.143.170.206:5432:*:11026270:Blarge > > But this does not: > 10.143.170.206:5432:*:11026270:Blarge # Host name: fubar How should libpq know where the password ends and the comment begins while still accepting passwords that contain "#"? The password is everything between the 4th unescaped colon and the end of line. This could be made explicit in the docs. But the docs don't even say that you can put entries and comments one the same line. -- Erik