Re: BUG #4040: psql should provide option to not prompt for password
От
Martin Pitt
Тема
Re: BUG #4040: psql should provide option to not prompt for
password
Дата
Msg-id
20080317170728.GB19155@piware.de
Ответ на
Список
Дерево обсуждения
BUG #4040: psql should provide option to not prompt for password "Mika Fischer" <mf+ubuntu@zoopnet.de>
Re: BUG #4040: psql should provide option to not prompt for
password Martin Pitt <martin@piware.de>
Re: BUG #4040: psql should provide option to not prompt for password "Gurjeet Singh" <singh.gurjeet@gmail.com>
Re: BUG #4040: psql should provide option to not prompt for password Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #4040: psql should provide option to not prompt for
password Martin Pitt <martin@piware.de>
Re: BUG #4040: psql should provide option to not prompt for
password Alvaro Herrera <alvherre@commandprompt.com>
Re: BUG #4040: psql should provide option to not prompt for
password Mika Fischer <mf+ubuntu@zoopnet.de>
Re: BUG #4040: psql should provide option to not prompt for password Peter Eisentraut <peter_e@gmx.net>
Re: BUG #4040: psql should provide option to not
prompt for password Bruce Momjian <bruce@momjian.us>
Re: BUG #4040: psql should provide option to not prompt for password Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #4040: psql should provide option to not prompt for
password Mika Fischer <mf+ubuntu@zoopnet.de>
Re: BUG #4040: psql should provide option to not prompt for password Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #4040: psql should provide option to not prompt for
password Mika Fischer <mf+ubuntu@zoopnet.de>
Re: BUG #4040: psql should provide option to not prompt for password Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #4040: psql should provide option to not prompt for password Peter Eisentraut <peter_e@gmx.net>
Re: BUG #4040: psql should provide option to not prompt for
password Alvaro Herrera <alvherre@commandprompt.com>
Re: BUG #4040: psql should provide option to not prompt for password Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #4040: psql should provide option to not
prompt for password Bruce Momjian <bruce@momjian.us>
Tom Lane [2008-03-17 10:48 -0400]:
> Martin Pitt writes:
> > if (PQstatus(pset.db) == CONNECTION_BAD &&
> > PQconnectionNeedsPassword(pset.db) &&
> > - password == NULL &&
> > + password == NULL && !getenv("PGPASSWORD") &&
> > !feof(stdin))
> > {
> > PQfinish(pset.db);
>
> What exactly do you think that accomplishes? AFAICS
> PQconnectionNeedsPassword can't possibly return true if there was a
> password available from PGPASSWORD (regardless of whether it was
> correct or not).
I don't claim to understand the complete code behind
PQconnectionNeedsPassword(). I just found that in at least 8.3RC1,
this did return True if pg_hba.conf set password authentication and
none was provided. I tried every trick that came into my mind,
redirecting stdin, using PGPASSWORD, and I think even a fake empty
.pgpass file, nothing worked.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)В списке pgsql-bugs по дате отправления
От: Peter Eisentraut
Дата:
От: Alvaro Herrera
Дата: