Re: Dump all except some tables? - Mailing list pgsql-general

From David Fetter
Subject Re: Dump all except some tables?
Date
Msg-id 20051007001224.GE30487@fetter.org
Whole thread Raw
In response to Re: Dump all except some tables?  ("Roger Hand" <RHand@kailea.com>)
Responses Re: Dump all except some tables?  (WireSpot <wirespot@gmail.com>)
List pgsql-general
On Thu, Oct 06, 2005 at 04:31:14PM -0700, Roger Hand wrote:
> > From: pgsql-general-owner@postgresql.org
> > [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Jim C. Nasby
> > Sent: Thursday, October 06, 2005 3:34 PM
> > Subject: Re: [GENERAL] Dump all except some tables?
> >
> > ... 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
>
> It may be useful to cut down on command line clutter if one could
> specify a file holding a list of table names to include/exclude.

Here's my thoughts on a summary:

[-t [table | glob]]...            # 0 or more -t options
[-T [table | glob]]...            # 0 or more -T options
[--include-tables-from-file f]
[--exclude-tables-from-file f]

where globs get expanded just the way they are in psql, and the
exclude is evaluated after the include to remove any tables where they
might conflict.  I don't think regex matching is needed or good.

Does this make sense?

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

pgsql-general by date:

Previous
From: CSN
Date:
Subject: Re: PostgreSQL 8.1 vs. MySQL 5.0?
Next
From: David Fetter
Date:
Subject: Re: PostgreSQL 8.1 vs. MySQL 5.0?