Password with libpq - Mailing list pgsql-admin

From reina_ga@hotmail.com (Tony Reina)
Subject Password with libpq
Date
Msg-id 272e4be7.0406270913.7a65f99f@posting.google.com
Whole thread Raw
Responses Re: Password with libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore usage
Next
From: Tom Lane
Date:
Subject: Re: Password with libpq