Re: how to check if a database exists programatically

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: how to check if a database exists programatically
Дата
Msg-id 20051208121141.GE11861@webserv.wug-glas.de
обсуждение исходный текст
Ответ на how to check if a database exists programatically  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
Список pgsql-general
am  08.12.2005, um 17:25:10 +0530 mailte surabhi.ahuja folgendes:
>  i have to write a shell script in which i have to check if the database "abc" exists or not
>
> how should i do it ? some select query
>
> select * from ??? where database_name = 'abc';

You can parse the output from 'psql -l'.


HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

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

Предыдущее
От: "surabhi.ahuja"
Дата:
Сообщение: how to check if a database exists programatically
Следующее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: how to check if a database exists programatically