Re: fully qualified domain names and .pgpass

From: Jeffrey Walton <noloader(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: fully qualified domain names and .pgpass
Date: 2022-10-04 19:21:30
Message-ID: CAH8yC8ntrPZejg0ePKexgvAYw0A4mCxm735+LnpzmjCFE=2kVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 4, 2022 at 1:02 PM Ron <ronljohnsonjr(at)gmail(dot)com> 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?

This is not a FQDN:

> "foobar.example.com".

A FQDN ends in dot '.' The dot denotes the top of the dns tree. So a
FQDN for the host would be:

foobar.example.com.

Anyone who tells you any different has not read W. Richard Stevens :)

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2022-10-04 21:02:28 Postgres calendar?
Previous Message Adrian Klaver 2022-10-04 17:34:20 Re: fully qualified domain names and .pgpass