Re: fully qualified domain names and .pgpass

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: fully qualified domain names and .pgpass
Date: 2022-10-04 17:34:20
Message-ID: 3ed4cb2f-c43f-86f8-5f80-491bad0b4211@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeffrey Walton 2022-10-04 19:21:30 Re: fully qualified domain names and .pgpass
Previous Message Alvaro Herrera 2022-10-04 17:33:11 Re: fully qualified domain names and .pgpass