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.