From: | "Campbell, Lance" <lance(at)illinois(dot)edu> |
---|---|
To: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | enhancement request for pg_restore |
Date: | 2015-08-13 15:10:21 |
Message-ID: | B75CD08C73BD3543B97E4EF3964B7D701FFB5FC5@CITESMBX1.ad.uillinois.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
PostgreSQL 9.4.x
I love using the PostgreSQL database. It is wonderful.
Please consider adding to pg_restore the command line option to exclude one or more tables similar to the pg_dump option.
Example:
--exclude-table=table
Why? I like to restore all tables within a particular namespace from our production database to our test database. But there are many times when you have some tables that hold data you don't necessarily need information from. In those cases I would exclude those tables. I would then do a second pg_restore so I could get the schema for those particular tables.
Example of how this would work:
pg_restore -U someuser -h localhost -d mydatabase --schema=myschema --exclude-table=myschema.table1 --exclude-table=myschema.table2 --format=custom /my/backup/to/restore
pg_restore -U someuser -h localhost -d mydatabase --schema-only -- table=myschema.table1 --table=myschema.table2 --format=custom /my/backup/to/restore
Thanks for considering this enhancement to pg_restore.
Lance Campbell
Web Services
University of Illinois
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-08-13 15:56:25 | Re: enhancement request for pg_restore |
Previous Message | Prasanth Reddy | 2015-08-11 16:31:54 | Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 |