Re: Possible PostgreSQL 8.3beta4 bug with MD5 authentication in psql?

From: Mark Cave-Ayland <mark(dot)cave-ayland(at)ilande(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Dave Page <dpage(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible PostgreSQL 8.3beta4 bug with MD5 authentication in psql?
Date: 2007-12-09 14:32:29
Message-ID: 1197210749.1146.18.camel@mca-desktop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Chernow 2007-12-09 14:44:04 PGparam timestamp question
Previous Message Michael Glaesemann 2007-12-09 13:18:01 Re: BUG #3811: Getting multiple values from a sequence generator