Re: BUG #8586: Misleading fe_sendauth error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik de Castro Lopo <mle+tools(at)mega-nerd(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8586: Misleading fe_sendauth error message
Date: 2013-11-11 04:26:18
Message-ID: 23838.1384143978@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Erik de Castro Lopo <mle+tools(at)mega-nerd(dot)com> writes:
> I haven't read the code, but my guess is that psql does the following:

> a) Grabs the user and database name from command line.
> b) Looks up dbname in pgpassfile to get host and port number etc.
> c) Connects to host:port and uses supplied username/password.

No, you are mistaken. The .pgpass file provides a password given
a user/dbname/host/port to be connected to. It is not the source
of any data other than the password.

You might want to look into the "service file" feature, which does
allow various connection parameters to be provided from a single name.

http://www.postgresql.org/docs/9.3/static/libpq-pgservice.html

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Erik de Castro Lopo 2013-11-11 04:36:54 Re: BUG #8586: Misleading fe_sendauth error message
Previous Message Erik de Castro Lopo 2013-11-11 04:19:38 Re: BUG #8586: Misleading fe_sendauth error message