pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik de Castro Lopo <mle+tools@mega-nerd.com>
To: pgsql-bugs@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: BUG #8586: Misleading fe_sendauth error message
Date: Mon, 11 Nov 2013 15:36:54 +1100
Message-ID: <20131111153654.ab7ec6477f8eaed7443c0131@mega-nerd.com> (raw)
In-Reply-To: <23838.1384143978@sss.pgh.pa.us>
References: <E1VfiQd-0003QU-BP@wrigleys.postgresql.org>
	<23565.1384143116@sss.pgh.pa.us>
	<20131111151938.36cb6bcaf4b83b70b0d068aa@mega-nerd.com>
	<23838.1384143978@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Tom Lane wrote:

> Erik de Castro Lopo <mle+tools@mega-nerd.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

Thanks, that looks like a better solution that the PGPASSFILE.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)

Message-ID: <20131111153654.ab7ec6477f8eaed7443c0131@mega-nerd.com>
Permalink:  ../20131111153654.ab7ec6477f8eaed7443c0131@mega-nerd.com/
Also on:    postgresql.org/message-id/20131111153654.ab7ec6477f8eaed7443c0131@mega-nerd.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mle+tools@mega-nerd.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #8586: Misleading fe_sendauth error message
  In-Reply-To: <20131111153654.ab7ec6477f8eaed7443c0131@mega-nerd.com>
  References: <E1VfiQd-0003QU-BP@wrigleys.postgresql.org> <23565.1384143116@sss.pgh.pa.us> <20131111151938.36cb6bcaf4b83b70b0d068aa@mega-nerd.com> <23838.1384143978@sss.pgh.pa.us> <20131111153654.ab7ec6477f8eaed7443c0131@mega-nerd.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox