Re: Move Tables From One Database to Another - Mailing list pgsql-general

From Gabriele Bartolini
Subject Re: Move Tables From One Database to Another
Date
Msg-id 4F74BA60.2040501@2ndQuadrant.it
Whole thread Raw
In response to Move Tables From One Database to Another  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Move Tables From One Database to Another
List 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.bartolini@2ndQuadrant.it | www.2ndQuadrant.it


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Move Tables From One Database to Another
Next
From: Jeff Davis
Date:
Subject: Re: PANIC: corrupted item pointer