Re: How to merge 3 databases in one database quickly

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Nagib Abi Fadel <nagib_postgres(at)yahoo(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to merge 3 databases in one database quickly
Date: 2003-06-09 14:57:28
Message-ID: Pine.LNX.4.33.0306090855090.1952-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 4 Jun 2003, 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 had errors when trying to restore, i fixed some of them but still i
> get other kinds of error.
> What i want to know is : IS THERE ANY OTHER WAY TO MERGE THE 3
> DATABASES QUICKLY WITHOUT GETTTING ERRORS ???

What might work is putting each one into a different schema. If you're
running 7.3 all you need to do is edit the dump files to create a
different schema for each database dump and import into that.

If you're not running 7.3.3 I'd recommend upgrading for this feature alone
for you, not to mention all the other improvements made from 7.2 to 7.3

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Cubitt 2003-06-09 15:49:33 2 servers with 1 database cluster
Previous Message scott.marlowe 2003-06-09 14:53:16 Re: timestamp