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 1oflnG-0005EG-QX for pgsql-general@arkaria.postgresql.org; Tue, 04 Oct 2022 17:33:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oflnE-0002mD-Sw for pgsql-general@arkaria.postgresql.org; Tue, 04 Oct 2022 17:33:20 +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 1oflnE-0002m4-Hy for pgsql-general@lists.postgresql.org; Tue, 04 Oct 2022 17:33:20 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oflnB-0000aV-EQ for pgsql-general@lists.postgresql.org; Tue, 04 Oct 2022 17:33:19 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 894515C0194; Tue, 4 Oct 2022 13:33:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 04 Oct 2022 13:33:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1664904795; x=1664991195; bh=3 WDydBdL/QfsEM9JC6NcfGqgbcexCuH/5Dn9aharY1o=; b=1T4sNmXrpD/mYD3+A btyiFEiUigEKPFyQcIICHQ9hSKs4bsCAo2O0I1nVm1TLiRgraYeMtGv6h6rrCG2S WGx1UJmPg5yx43ztZVehxzDuA+EZYhw4wycY5gnEnqOyFTQjUV5d1Qq+FE9UJbn1 1ihZxqbb2wJsKnjrNMr3u9SSCcaAMhw+kJsgAwbhuRMQc+DzfiFstD/8/etYEP6O ghtrhQ7Fj5fGNEN1xLXGEWw2oqZQ1ysvjSSFvBVZFf1QpC8OGFqWkhv6FJ2MEZjX 35+UkVsuhx7ggr90WW1IxvrbVgX7HPZLIHu4n+eNUoWgJOjxNJF/gvHgudL78ARb ZSTew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeiuddguddugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvfevuffkgggtugfgjgesth ekredttddtjeenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepuedufeekke efgfefkeegudegveetgeeutedtgfdutdfgjefftddvtedugfelleeunecuffhomhgrihhn pegvgigrmhhplhgvrdgtohhmpdhpohhsthhgrhgvshhqlhdrohhrghdpvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Oct 2022 13:33:14 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D536962; Tue, 4 Oct 2022 19:33:11 +0200 (CEST) Date: Tue, 4 Oct 2022 19:33:11 +0200 From: Alvaro Herrera To: Ron Cc: pgsql-general@lists.postgresql.org Subject: Re: fully qualified domain names and .pgpass Message-ID: <20221004173311.uysuoi3uiynq6u23@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <393e2cf2-847b-047a-fe31-3267ae41f0a6@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Oct-04, Ron wrote: > Sometimes (both interactively and via script) I access a remote Pg server > via just the bare host name "foobar", and other times via the FQDN > "foobar.example.com". > > I've only been able to get this to work by having two lines in the .pgpass file: Maybe it would be simpler to do this using a service definition in the ~/.pg_service.conf file. https://www.postgresql.org/docs/current/libpq-pgservice.html -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/