Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: localhost in pgpass file?


  • From: Andrew Dunstan <andrew(at)dunslane(dot)net>
  • To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
  • Subject: Re: localhost in pgpass file?
  • Date: Thu, 27 Oct 2005 09:29:54 -0400
  • Message-id: <4360D652(dot)10807(at)dunslane(dot)net>



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.

cheers

andrew






Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group