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

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

pgsql-admin by date

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

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