Move Tables From One Database to Another

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Move Tables From One Database to Another
Дата
Msg-id alpine.LNX.2.00.1203291206550.7215@salmo.appl-ecosys.com
обсуждение исходный текст
Ответы Re: Move Tables From One Database to Another  (Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>)
Re: Move Tables From One Database to Another  (Andy Colson <andy@squeakycode.net>)
Список pgsql-general
    I'm storing vector map attribute data in postgres tables and somehow
managed to create two databases (of similar names) rather than one. I want
to combine the two.

    For tables that exist in the one database I want to eliminate, I thought
to use pg_dump to create .sql files, then use pg_restore to add the table to
the other database. Did this for one table (with 4201 rows), but 'pg_restore
-d database_name -t table_name' appears to not complete; it seems to have
hung up somewhere. While I see nothing specific in the output file or the
pg_restore man page this must not be the proper approach.

   Also, I need suggestions on how to combine tables that exist in both
databases by adding rows from the source database not in the target database
and modifying rows that differ.

    As I'm not a professional or full-time DBA I'm probably missing really
simple syntax and approaches. Your advice will be appreciated.

Rich


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

Предыдущее
От: Tom Molesworth
Дата:
Сообщение: Re: Managing two sets of data in one database
Следующее
От: Gabriele Bartolini
Дата:
Сообщение: Re: Move Tables From One Database to Another