Re: pg_dump in cycle

Поиск
Список
Период
Сортировка
От Lars Haugseth
Тема Re: pg_dump in cycle
Дата
Msg-id 200409171400.55590.lars@tinde.com
обсуждение исходный текст
Ответ на Re: pg_dump in cycle  ("Najib Abi Fadel" <nabifadel@usj.edu.lb>)
Список pgsql-general
* Najib Abi Fadel:
| This seems to be more interesting for shell scripting:
|
|  psql -d DatabaseName -c 'select datname from pg_database where not
| datistemplate' ;
|
|      datname
| -----------------
|  fgm_eval
|  hotline
|  usj
|  dragon_devel
|  dragon_joujou
|  dragon_devel_v2
|  dragon_prod
|  fgm
| (8 rows)

$ psql -ltA | cut -d'|' -f1 | grep -v '^template' | xargs -i pg_dump -f {}.pg_dump {}
--
-- PostgreSQL database dump complete
--

--
-- PostgreSQL database dump complete
--

$ ls -l *.pg_dump
-rw-r--r--    1 postgres users         493 2004-09-17 14:00 foo.pg_dump
-rw-r--r--    1 postgres users        3326 2004-09-17 14:00 test.pg_dump

--
Lars Haugseth

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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: PSQLFS - PostgreSQL File System
Следующее
От: Lars Haugseth
Дата:
Сообщение: Re: psql + autocommit