Re: localhost in pgpass file?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: localhost in pgpass file?
Date: 2005-10-27 13:53:24
Message-ID: 200510271353.j9RDrOP26929@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
>
>
> Andrew Dunstan wrote:
>
> >
> > Can anyone explain to me why 'localhost' in a .pgpass file matches
> > both a Unix socket and a tcp localhost connection?
> >
> > Also, there is no documentation at all that I can see to cover the
> > Unix socket case. I found the information after much looking through
> > asking on IRC, where luckily Andrew(at)Supnews knew the answer.
>
>
> Nobody answered (or maybe cared? :-) )
>
> I propose to document the slightly odd behaviour with this wording:
>
> The literal value <literal>localhost</literal> in the hostname field
> matches
> an empty hostname connection parameter as well as matching its literal
> value.
> This can be useful for specifying Unix-domain socket connections.

Added to docs:

A hostname of <literal>localhost</> matches both <literal>host</> (TCP)
and <literal>local</> (Unix domain socket) connections coming from the
local machine.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-10-27 13:54:09 Re: ERROR: invalid memory alloc request size <a_big_number_here>
Previous Message Bruce Momjian 2005-10-27 13:48:29 Re: ERROR: invalid memory alloc request size <a_big_number_here>