Re: How to query information schema from shell script

Поиск
Список
Период
Сортировка
От George Pavlov
Тема Re: How to query information schema from shell script
Дата
Msg-id 8C5B026B51B6854CBE88121DBF097A8655C599@ehost010-33.exch010.intermedia.net
обсуждение исходный текст
Ответ на Re: How to query information schema from shell script  ("Jon Horsman" <horshaq@gmail.com>)
Список pgsql-sql
simplest might be psql -l.

> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Jon Horsman
> Sent: Friday, October 27, 2006 8:13 AM
> To: pgsql-sql@postgresql.org
> Subject: Re: [SQL] How to query information schema from shell script
>
> In my original email i forgot to mentioned i need to know if the
> database exists or not from the shell script.  If it doesn't exist i
> would then create it.  Currently i was just creating the db everytime
> our db script is run (since it doesn't hurt the db) but this generates
> the 'db already exists' log and I now have the requirement that the
> users not see that log.  ie, don't run createdb if it already exists.
>
> In looking through the postgres docs i can see how to check if a table
> exists but not how a db exists.
>
> Again, thanks for the help.
>
> Jon


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

Предыдущее
От: "Aaron Bono"
Дата:
Сообщение: Re: not able to execute query on spatial database.
Следующее
От: "Doug Hyde"
Дата:
Сообщение: Function to reset sequence.....