Re: How to merge 3 databases in one database quickly

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: How to merge 3 databases in one database quickly
Дата
Msg-id 3EE1F2FB.10920.59350E2@localhost
обсуждение исходный текст
Ответ на How to merge 3 databases in one database quickly  (Nagib Abi Fadel <nagib_postgres@yahoo.com>)
Список pgsql-general
On 4 Jun 2003 at 0:52, Nagib Abi Fadel wrote:

>
> I'm trying to merge 3 databases in one database using pg_dump.
>
> pg_dump db1 > database.txt
> pg_dump db2 >> database.txt
> pg_dump db3 >> database.txt
>
> then i restore:
> psql database < database.txt

I haven't looked at database dump recently, but I believe the problem might be
that you have conflicting object names in 3 databases. e.g. if there are two
table of same name customer but different schema, things will obviously abort.

Assuming you have 7.3.x, you can edit each database dump and put a create
schema statement on top of each dump file and set that schema first in schema
search path. That way your 3 databases will end up in 3 schemas.

If you could tell us the exact errors you are getting that would be more
helpful.

HTH

Bye
 Shridhar

--
Wilcox's Law:    A pat on the back is only a few centimeters from a kick in the
pants.


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Return Record
Следующее
От: Jeff Fitzmyers
Дата:
Сообщение: Re: Backups and restores.