On Sat, 2007-12-08 at 10:09 -0500, Tom Lane wrote:
> > My vote goes to (3), if the work can be done quickly, or (1) if it
> > can't.
Ditto.
> I don't think it's a big problem to do, as long as we are agreed on
> the behavior we want. In particular, consider:
>
> 1. If libpq obtains a password internally (ie, from PGPASSWORD or
> ~/.pgpass), and it's wrong, do we want a user password prompt?
>
> 2. If we prompt the user for a password, and it's wrong, do we
> want to try again?
>
> Our historical behavior on both points was "no", but at least
> the second one seems a bit questionable.
I'd say that you definitely don't want a user password prompt if libpq's
password is wrong, since I can see this would break a lot of scripts
that weren't launched directly from the shell - the switch from
non-interactive to interactive would cause the script to hang in the
background rather than return immediately with an error (indeed it was
this confusing symptom in the PostGIS installer that flagged the change
in behaviour).
As for the second point, I'm not too worried about how many times you
are asked for the password - I personally am happy with the one attempt
as it stands at the moment. My main concern is the switch from a
non-interactive mode to an interactive mode.
Kind regards,
Mark.
--
ILande - Open Source Consultancy
http://www.ilande.co.uk