From: | "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4040: psql should provide option to not prompt for password |
Date: | 2008-03-17 14:30:55 |
Message-ID: | 65937bea0803170730g25b930fbs8b4535ac49e619e5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Mar 17, 2008 at 7:34 PM, Martin Pitt <martin(at)piware(dot)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,
--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
17° 29' 34.37"N, 78° 30' 59.76"E - Hyderabad *
18° 32' 57.25"N, 73° 56' 25.42"E - Pune
37° 47' 19.72"N, 122° 24' 1.69" W - San Francisco
Mail sent from my BlackLaptop device
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-03-17 14:35:53 | Re: BUG #4039: server closed the connection when use function "makeline_garray" |
Previous Message | Tom Lane | 2008-03-17 14:26:30 | Re: BUG #4040: psql should provide option to not prompt for password |