Re: Determine if a user and database are available

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Determine if a user and database are available
Дата
Msg-id 67c3e292-e33a-cad9-bc49-f480b0a31f50@aklaver.com
обсуждение исходный текст
Ответ на Re: Determine if a user and database are available  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-general
On 9/2/22 17:33, Ron wrote:
> On 9/2/22 17:21, Tom Lane wrote:
>> Jeffrey Walton <noloader@gmail.com> writes:
>>> I have another beginner question. I am trying to use pg_isready to
>>> determine if a database and user are present. The program seems to
>>> always succeed, even when I delete the user or the database.
>> That's a feature actually.  The intended use of pg_isready is to
>> find out if the server is alive, not whether any particular user
>> or database name is correct.
> 
> Then what's the point of the --username=USERNAME connection option?
> 

My guess so you can specify a 'test' user that you can track in the logs.

-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Ron
Дата:
Сообщение: Re: Determine if a user and database are available
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Determine if a user and database are available