Re: Dump all except some tables?

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, WireSpot <wirespot(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Dump all except some tables?
Date: 2005-10-06 22:34:27
Message-ID: 20051006223427.GR36108@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 06, 2005 at 12:32:26PM -0700, David Fetter wrote:
> On Thu, Oct 06, 2005 at 09:51:22AM -0400, Tom Lane wrote:
> > WireSpot <wirespot(at)gmail(dot)com> writes:
> > > On 10/6/05, A. Kretschmer <akretschmer(at)despammed(dot)com> wrote:
> > >> You can use the -t more than once.
> > >>
> > >> pg_dump -U foobar database -t foo -t foo1
> >
> > > Yes, pg_dump doesn't complain. But it only takes the first one
> > > into consideration. I only get one table in the dump.
> >
> > Right. That's on the TODO list but not done yet :-(.
>
> There have been several patches against pg_dump to do both
> multiple-table inclusion and multiple-table exclusion. These may get
> into 8.2, as they missed 8.1.

Looking at the archived discussion from the TODO
(http://momjian.postgresql.org/cgi-bin/pgtodo?pg_dump), I find myself
wondering if it would be good to allow for specifying a set of rules for
what to dump in a file, probably something like a set of regexes with a
way to specify if it's an include or exclude rule. Seems like it would
be a heck of a lot simpler to do that for complex cases than deal with a
pile of spaghetti on the command-line, but I've never really worried
about it.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2005-10-06 22:41:49 Re: PostgreSQL Gotchas
Previous Message Jim C. Nasby 2005-10-06 22:31:30 Re: PostgreSQL Gotchas