Skip site navigation (1) Skip section navigation (2)

Re: excluding a table from pg_dump

From: Josh(dot)Zeckser(at)jeppesen(dot)com
To: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-admin-owner(at)postgresql(dot)org
Subject: Re: excluding a table from pg_dump
Date: 2005-10-25 16:28:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
pgsql-admin-owner(at)postgresql(dot)org wrote on 10/25/2005 02:31:51 AM:

> It's possible with pg_restore to exclude that table on /restore/, but 
> that's not what you asked for..
> On 25.10.2005 11:08, Gourish Singbal wrote:
> > pg_dump does not allow you to accomplish this task for sure.
> > 
> > On 10/20/05, Colton A Smith <smith(at)cs(dot)utk(dot)edu> wrote: 
> >> I don't think this is possible, but I want to make sure. Let's say I
> >> have a database that I want to dump in its entirety, all except for 
> >> particular table. Is there an option flag on pg_dump that 
> >> this?

Here is an option: Dump into a test database, drop the table in the test 
db & dump to file:
pg_dump originaldb | psql testdb < droptable.sql; pg_dump testdb > 

In response to


pgsql-admin by date

Next:From: Chris BrowneDate: 2005-10-25 16:33:11
Subject: Re: excluding a table from pg_dump
Previous:From: Jeff FrostDate: 2005-10-25 15:55:06
Subject: Re: Replaying archived wal files after a dump restore?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group