Re: Password with libpq

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: reina_ga(at)hotmail(dot)com (Tony Reina)
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Password with libpq
Date: 2004-06-27 22:12:37
Message-ID: 14320.1088374357@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

reina_ga(at)hotmail(dot)com (Tony Reina) writes:
> 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.)

Look into the psql source code; it does essentially this.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Frank Knobbe 2004-06-28 04:51:51 Re: Insert binary data on postgre
Previous Message Ben-Nes Michael 2004-06-27 20:00:57 Re: Is this a "Stupid Question" ?