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



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to