Re: Determine if a user and database are available

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Determine if a user and database are available
Дата
Msg-id CAKFQuwYLrrnXqQNvVow58HKwjmoapLyNfzo+099zwAYQHQ28mQ@mail.gmail.com
обсуждение исходный текст
Ответ на Determine if a user and database are available  (Jeffrey Walton <noloader@gmail.com>)
Список pgsql-general
On Friday, September 2, 2022, Jeffrey Walton <noloader@gmail.com> wrote:

Given the NOTES in the man page, how do we determine if a user and
database are present using the shell? Is there another utility we
should be using?

Literally every other shell program that requires logging into the database will fail if invalid credentials are provided.

Or, you can use good credentials and psql to connect to a known database and then query the system to learn, without an error, if other roles or databases exist in the same cluster.

David J.

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

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