Re: [ADMIN] Password with libpq

2004-06-28 Thread Peter Eisentraut
Tony and Bryn Reina wrote: > Thanks Tom. I found the relevant bit of code in the psql files. Looks > like it's just a simple loop that compares the error with the phrase > "fe_sendauth: no password supplied" and then prompts for the password > and tries again. Of course, if someone in the future de

Re: [ADMIN] Password with libpq

2004-06-28 Thread Tony and Bryn Reina
e error message, then the code gets broke. I doubt that's likely however. -Tony - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "Tony Reina" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, June 28, 2004 12:12 AM Sub

Re: [ADMIN] Password with libpq

2004-06-27 Thread Tom Lane
[EMAIL PROTECTED] (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 m

[ADMIN] Password with libpq

2004-06-27 Thread Tony Reina
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.