Re: localhost in pgpass file? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: localhost in pgpass file?
Date
Msg-id 4360D652.10807@dunslane.net
Whole thread Raw
In response to localhost in pgpass file?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: localhost in pgpass file?
List pgsql-hackers

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@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 
matchesan empty hostname connection parameter as well as matching its literal 
value.This can be useful for specifying Unix-domain socket connections.

cheers

andrew


>


pgsql-hackers by date:

Previous
From: Matteo Beccati
Date:
Subject: Re: ERROR: invalid memory alloc request size
Next
From: Tom Lane
Date:
Subject: Re: ERROR: invalid memory alloc request size