Re: Possible PostgreSQL 8.3beta4 bug with MD5 authentication in psql? - Mailing list pgsql-hackers

From Mark Cave-Ayland
Subject Re: Possible PostgreSQL 8.3beta4 bug with MD5 authentication in psql?
Date
Msg-id 1197210749.1146.18.camel@mca-desktop
Whole thread Raw
In response to Re: Possible PostgreSQL 8.3beta4 bug with MD5 authentication in psql?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, 2007-12-08 at 17:09 -0500, Tom Lane wrote:

> So what I think we must do is split the function into two:
> 
> PQconnectionNeedsPassword: true if server demanded a password and there
> was none to send (hence, can only be true for a failed connection)
> 
> PQconnectionUsedPassword: true if server demanded a password and it
> was supplied from the connection function's argument list, *not*
> from environment or a password file.
> 
> Offhand it looks like only dblink needs the second version ---
> all of our client-side code wants the first one.
> 
> Barring objections I'll go code this up ...

Yup, that looks good to me. My only criticism would be that the name
PQconnectionUsedPassword could be a little misleading, in that based
upon the name I would expect it to return true if a password was
specified regardless of whether the method used was interactive, .pgpass
or PGPASSWORD.

The only other suggestion I can think of at the moment would be
PQconnectionUsedConnectionPassword which seems to better sum up its
purpose to me...


Kind regards,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk




pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Release Note Changes
Next
From: Andrew Chernow
Date:
Subject: PGparam timestamp question