Search Postgresql Archives

Re: Move Tables From One Database to Another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx | www.2ndQuadrant.it


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux