Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZPurq-0002Lz-G6 for pgsql-admin@arkaria.postgresql.org; Thu, 13 Aug 2015 15:56:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZPurp-0008PA-Qc for pgsql-admin@arkaria.postgresql.org; Thu, 13 Aug 2015 15:56:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZPurp-0008Of-5G for pgsql-admin@postgresql.org; Thu, 13 Aug 2015 15:56:33 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZPurm-0000QT-3L for pgsql-admin@postgresql.org; Thu, 13 Aug 2015 15:56:32 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id 56758860001; Thu, 13 Aug 2015 17:56:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-6.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p5DDC6110.dip0.t-ipconnect.de [93.220.97.16]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id BDCE6860001; Thu, 13 Aug 2015 17:56:25 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 306DA100B44; Thu, 13 Aug 2015 17:56:25 +0200 (CEST) Date: Thu, 13 Aug 2015 17:56:25 +0200 From: Andres Freund To: "Campbell, Lance" Cc: "pgsql-admin@postgresql.org" Subject: Re: enhancement request for pg_restore Message-ID: <20150813155625.GF8988@awork2.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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