Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group