| From: | Gabriele Bartolini <gabriele(dot)bartolini(at)2ndQuadrant(dot)it> |
|---|---|
| To: | Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Move Tables From One Database to Another |
| Date: | 2012-03-29 19:39:12 |
| Message-ID: | 4F74BA60.2040501@2ndQuadrant.it |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi Rich,
Il 29/03/12 21:10, Rich Shepard ha scritto:
> 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.
pg_restore works exclusively with custom or tar format archives from
pg_dump (see -F option).
I suggest that you look at the -l and -L options in pg_restore, which
allow you to select which dump entries to restore (selective restore).
Cheers,
Gabriele
--
Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gabriele(dot)bartolini(at)2ndQuadrant(dot)it | www.2ndQuadrant.it
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2012-03-29 19:39:38 | Re: PANIC: corrupted item pointer |
| Previous Message | Rich Shepard | 2012-03-29 19:10:12 | Move Tables From One Database to Another |