From: Andres Freund <andres@anarazel.de>
To: Campbell, Lance <lance@illinois.edu>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: enhancement request for pg_restore
Date: Thu, 13 Aug 2015 17:56:25 +0200
Message-ID: <20150813155625.GF8988@awork2.anarazel.de> (raw)
In-Reply-To: <B75CD08C73BD3543B97E4EF3964B7D701FFB5FC5@CITESMBX1.ad.uillinois.edu>
References: <B75CD08C73BD3543B97E4EF3964B7D701FFB5FC5@CITESMBX1.ad.uillinois.edu>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Hi Lance,
On 2015-08-13 15:10:21 +0000, Campbell, Lance wrote:
> PostgreSQL 9.4.x
>
> I love using the PostgreSQL database. It is wonderful.
Good to hear!
> 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.
You can kind of do this today using pg_restore's --list parameter to
dump the list of objects in the archive, then remove the objects you
don't need/want, and then use --use-list to restore only the remaining
objects.
Greetings,
Andres Freund
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: andres@anarazel.de, lance@illinois.edu
Subject: Re: enhancement request for pg_restore
In-Reply-To: <20150813155625.GF8988@awork2.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox