Re: databases list to file

Поиск
Список
Период
Сортировка
От Jeff Ross
Тема Re: databases list to file
Дата
Msg-id 48EE14BB.70609@wykids.org
обсуждение исходный текст
Ответ на databases list to file  (Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com>)
Ответы Re: databases list to file  ("postgres Emanuel CALVO FRANCO" <postgres.arg@gmail.com>)
Список pgsql-general
Joao Ferreira gmail wrote:
> Hello all,
>
> I need to print to a file a simple list of all the databases on my
> postgresql.
>
> I need to do this from a shell script to be executed without human
> intervention
>
> I guess something like:
>
> su postgres -c 'psql ...whatever.... > /tmp/my_databases.txt'
>
> but I don't know exactly to what extent I can format the output of this
> in order to simplify the parser that will read that file.
>
> any suggestions ?
>
> thank you
>
> joao
>
>
>

psql -tc 'select datname from pg_database' template1

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

Предыдущее
От:
Дата:
Сообщение: PLSQL function calling another function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PLSQL function calling another function