psql shell return codes - checking if database exists

Поиск
Список
Период
Сортировка
От Mario Splivalo
Тема psql shell return codes - checking if database exists
Дата
Msg-id 48048E3E.2090807@megafon.hr
обсуждение исходный текст
Ответы Re: psql shell return codes - checking if database exists
Список pgsql-admin
I need to check, from a bash script, if certain database exists in a
postgres cluster. When I issue:

psql -U someuser somedatabase

psql returns error code 2 regardless of 'no user' or 'no database'
condition. How could I distinguish from the two?

    Mario

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

Предыдущее
От: lfedden@contextworld.com
Дата:
Сообщение: OID and filesystem issues
Следующее
От: "Dmitry Shubin"
Дата:
Сообщение: postgres 8.1 usermanagement problem