Re: databases list to file

Поиск
Список
Период
Сортировка
От postgres Emanuel CALVO FRANCO
Тема Re: databases list to file
Дата
Msg-id f205bb120810141138w1a1e7d57p13e2240eb1dddec8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: databases list to file  (Jeff Ross <jross@wykids.org>)
Ответы Re: databases list to file
Список pgsql-general
inside psql turn \o file
then \l



2008/10/9 Jeff Ross <jross@wykids.org>:
> 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
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

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

Предыдущее
От: Bill Thoen
Дата:
Сообщение: Re: Update with a Repeating Sequence
Следующее
От: Mikkel Høgh
Дата:
Сообщение: Re: Drupal and PostgreSQL - performance issues?