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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Pitt <martin(at)piware(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4040: psql should provide option to not prompt for password
Date: 2008-03-17 14:48:35
Message-ID: 9362.1205765315@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Martin Pitt <martin(at)piware(dot)de> 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).

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mika Fischer 2008-03-17 14:57:53 Re: BUG #4040: psql should provide option to not prompt for password
Previous Message Alvaro Herrera 2008-03-17 14:43:37 Re: BUG #4040: psql should provide option to not prompt for password