On Sat, Oct 21, 2017 at 8:24 AM, doganmeh <meh...@edgle.com> wrote:

> Seems that would be easier and less error prone. Thanks,
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-
> f1843780.html
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>


>I was dumping each table to a separate file so I could pick and choose
when restoring...

*It seems to me that instead on multiple single table dumps, you could take
advantage of restoring from a list-file.*


*Just *
*1. do a dump with custom format ( -F c)*

*EG: pg_dump -U postgres -F c -t table1 -t table2 -t table3 yourdb >
yourdb.dmp*


*2. use pg_restore -l to create a list-file*
*EG: pg_restore -l yourdb.dmp > yourdb.lis*

*3. edit yourdb.lis and comment out ( prefix with ; ) any line you don't
want*


*4. then use pg_restore with the edited list-file  *

*EG:  pg_restore -L yourdb.lis yourdb.dmp*

*See examples at the end of*

*https://www.postgresql.org/docs/9.6/static/app-pgrestore.html
<https://www.postgresql.org/docs/9.6/static/app-pgrestore.html>*

-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Reply via email to