Re: 127.0.0.1 or localhost

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: c(dot)santos(at)asctechnologies(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: 127.0.0.1 or localhost
Date: 2020-10-30 23:04:29
Message-ID: 144187.1604099069@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

PG Doc comments form <noreply(at)postgresql(dot)org> writes:
> It's not actually a problem, it's a question. pgpass in my case, has two
> lines, one with 127.0.0.1 and another with localhost
> what would be the difference from one to another. ??

AFAIR, the field is matched to how you wrote the hostname in the
connection parameters.

Also, it looks like there's a special case to consider 'localhost'
as matching a Unix-socket connection, if the socket is in the
installation's default socket directory.

regards, tom lane

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Justin Pryzby 2020-10-31 21:34:44 Re: Additional Chapter for Tutorial
Previous Message PG Doc comments form 2020-10-30 18:33:10 127.0.0.1 or localhost