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 1ofloK-0005IQ-SX for pgsql-general@arkaria.postgresql.org; Tue, 04 Oct 2022 17:34:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ofloJ-0007Ji-LZ for pgsql-general@arkaria.postgresql.org; Tue, 04 Oct 2022 17:34:27 +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 1ofloI-0007G3-JM for pgsql-general@lists.postgresql.org; Tue, 04 Oct 2022 17:34:27 +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 1ofloF-0000bf-6b for pgsql-general@lists.postgresql.org; Tue, 04 Oct 2022 17:34:26 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 08B1D5C0059 for ; Tue, 4 Oct 2022 13:34:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 04 Oct 2022 13:34:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1664904862; x= 1664991262; bh=/IxdUDfhc+bnW54jlEeKV42RMDqenmpJXj8FVadlLeE=; b=l 9AmcrN6I0FWLlK9URs37kfb/p82mhLjqkOu8soXqGYcwAIdqma6W3dW97EkgHiZa UpNTUPRR/TK5vQmSWetldk1vYvVMQ3JQfJSnynyfmq59VTw3zxtkRhCuWUsvb7G+ YPGz7y/W1YbRZL+CbPSwN3a+eLV0InzfGCBGwAdAk5odYx87qbWBrmazyvNn6laM xBaCAGHLP06Y3xzlQt2t2WFe1a/tGLciSrNjJu4ts7VaScACWBbtxSpzG/GJ8f3H VXOTtJdb+ME8favJ2p/no9XbnMnY4tfPdAn/2l4l9Qwzzf2fS2fsx+vYWUeW3fL+ kjvkn6fAZiQXQ75+yAI1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references: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=1664904862; x=1664991262; bh=/ IxdUDfhc+bnW54jlEeKV42RMDqenmpJXj8FVadlLeE=; b=ZhkiGvyfXwflGEYbB 3pQ0TE4o9ASFG+RjZaaZPRerJkTAzLFiL7XHVQd0qzy42Dg/cT4BaCtbT5k/bD4Y jEnlhCm/TgpgbrjTC6iScyHOXzdCAFNu9OoVJLVu3yegSpJnXFYU+sIxaKcFigFe GjffGC5gPXw0YlAsKKMIqH9nWhqNR0ONrdvlaJH8IaoqQIKaF/+fkxbSQfPHtNKO wnIvj0zQ/jtcoEZFjqcK2ACx7c/3ZbNel5JWhaexOKEPFygRl05UTIpJRxP4V8eU y2vDb46JmjXXFhzOobGNPIJA5dSV2PC8MFrg4FdiOVmE5MMJYf2Bxiv141zhWcbF 6IEOQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeiuddguddugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeejheffje evhfdufeelvedtudekgeetudfhfeehjeetveduleeuhfdvtdfhveetgfenucffohhmrghi nhepvgigrghmphhlvgdrtghomhdpphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 4 Oct 2022 13:34:21 -0400 (EDT) Subject: Re: fully qualified domain names and .pgpass To: pgsql-general@lists.postgresql.org References: <393e2cf2-847b-047a-fe31-3267ae41f0a6@gmail.com> From: Adrian Klaver Message-ID: <3ed4cb2f-c43f-86f8-5f80-491bad0b4211@aklaver.com> Date: Tue, 4 Oct 2022 10:34:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <393e2cf2-847b-047a-fe31-3267ae41f0a6@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/4/22 10:02 AM, 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: > > foobar:5432:postgres:Allegedly.Strong.Password > foobar.example.com:5432:postgres:Allegedly.Strong.Password > > But I'd rather have only one line.  Is there any way to do that? Would a service file: https://www.postgresql.org/docs/14/libpq-pgservice.html work? -- Adrian Klaver adrian.klaver@aklaver.com