Re: BUG #4040: psql should provide option to not prompt for password

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: BUG #4040: psql should provide option to not prompt for password
Дата
Msg-id 65937bea0803170730g25b930fbs8b4535ac49e619e5@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #4040: psql should provide option to not prompt for password  (Martin Pitt <martin@piware.de>)
Список pgsql-bugs
On Mon, Mar 17, 2008 at 7:34 PM, Martin Pitt <martin@piware.de> wrote:

> Mika Fischer [2008-03-17 10:19 +0000]:
> > Description:        psql should provide option to not prompt for
> password
> > Details:
> >
> > Hi,
> >
> > I'm currently working on the bash-completion package. The problem with
> > postgresql is that psql cannot safely be called because there is no way
> to
> > know whether it will prompt for a password and there is also no way to
> avoid
> > the prompt.
> >
> > Needless to say a password prompt is very bad in the context of
> > tab-completion.
> >
> > Ideally, psql should provide an option --no-password which would cause
> it to
> > never promt for a password, and in case one is needed, fail as if a
> wrong
> > one was given.
> >
> > However if you can think of an easier way to accomplish this, I'd be
> > grateful for pointers.
>
> Indeed I have a similar problem. I use psql to probe for actual
> availability of cluster startup in the integration scripts (pg_ctl
> does not provide that) and also stumbled over this.
>
> Earlier versions did not prompt if PGPASSWD was supplied, 8.3 changed
> this behaviour.


That should be PGPASSWORD

The 8.3 docs still mention it here:

http://www.postgresql.org/docs/8.3/interactive/libpq-envars.html

This applies to psql too, since psql uses libpq to communicate with the
server.

If you think that docs are out of sync, please raise a bug for that. Also,
there's a workaround mentioned there (~/.pgpass file), see if that helps.

Best regards,

--=20
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

17=B0 29' 34.37"N, 78=B0 30' 59.76"E - Hyderabad *
18=B0 32' 57.25"N, 73=B0 56' 25.42"E - Pune
37=B0 47' 19.72"N, 122=B0 24' 1.69" W - San Francisco

http://gurjeet.frihost.net

Mail sent from my BlackLaptop device

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4039: server closed the connection when use function "makeline_garray"
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #4040: psql should provide option to not prompt for password