Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfj4z-0007BA-Eb for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Nov 2013 04:26:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vfj4y-0004mt-Q5 for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Nov 2013 04:26:24 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfj4x-0004mm-Oj for pgsql-bugs@postgresql.org; Mon, 11 Nov 2013 04:26:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfj4v-0003Tm-53 for pgsql-bugs@postgresql.org; Mon, 11 Nov 2013 04:26:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id rAB4QIBL023839; Sun, 10 Nov 2013 23:26:18 -0500 From: Tom Lane To: Erik de Castro Lopo cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8586: Misleading fe_sendauth error message In-reply-to: <20131111151938.36cb6bcaf4b83b70b0d068aa@mega-nerd.com> References: <23565.1384143116@sss.pgh.pa.us> <20131111151938.36cb6bcaf4b83b70b0d068aa@mega-nerd.com> Comments: In-reply-to Erik de Castro Lopo message dated "Mon, 11 Nov 2013 15:19:38 +1100" Date: Sun, 10 Nov 2013 23:26:18 -0500 Message-ID: <23838.1384143978@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Erik de Castro Lopo 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs