Re: Password with libpq

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Password with libpq
Дата
Msg-id 14320.1088374357@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Password with libpq  (reina_ga@hotmail.com (Tony Reina))
Список pgsql-admin
reina_ga@hotmail.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

В списке pgsql-admin по дате отправления:

Предыдущее
От: reina_ga@hotmail.com (Tony Reina)
Дата:
Сообщение: Password with libpq
Следующее
От: Frank Knobbe
Дата:
Сообщение: Re: Insert binary data on postgre