Password with libpq

From: reina_ga(at)hotmail(dot)com (Tony Reina)
To: pgsql-admin(at)postgresql(dot)org
Subject: Password with libpq
Date: 2004-06-27 17:13:54
Message-ID: 272e4be7.0406270913.7a65f99f@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm setting my PostgreSQL server to demand md5 encrypted passwords
from users. In my C programs (using libpq as the interface), it's no
big deal to pass the password through PQconnectdb.

However, what about in the general case where my client program
doesn't know if a password is required or not. Is there any libpq
function to query the server if a password is required? Perhaps,
there's a return value for PQconnectdb which would tell me that the
connection failed because of the password? (In which case, I can ask
for the password and try the connection again.)

Thanks.
-Tony

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ben-Nes Michael 2004-06-27 20:00:57 Re: Is this a "Stupid Question" ?
Previous Message Tom Lane 2004-06-27 14:22:28 Re: pg_restore usage