pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: fully qualified domain names and .pgpass
Date: Tue, 4 Oct 2022 10:34:20 -0700
Message-ID: <3ed4cb2f-c43f-86f8-5f80-491bad0b4211@aklaver.com> (raw)
In-Reply-To: <393e2cf2-847b-047a-fe31-3267ae41f0a6@gmail.com>
References: <393e2cf2-847b-047a-fe31-3267ae41f0a6@gmail.com>

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







view thread (5+ messages)  latest in thread

Message-ID: <3ed4cb2f-c43f-86f8-5f80-491bad0b4211@aklaver.com>
Permalink:  ../3ed4cb2f-c43f-86f8-5f80-491bad0b4211@aklaver.com/
Also on:    postgresql.org/message-id/3ed4cb2f-c43f-86f8-5f80-491bad0b4211@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com
  Subject: Re: fully qualified domain names and .pgpass
  In-Reply-To: <3ed4cb2f-c43f-86f8-5f80-491bad0b4211@aklaver.com>
  References: <393e2cf2-847b-047a-fe31-3267ae41f0a6@gmail.com> <3ed4cb2f-c43f-86f8-5f80-491bad0b4211@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox