Re: Dump all except some tables?

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

On Fri, Oct 07, 2005 at 11:47:26AM +0300, WireSpot wrote:
> On 10/7/05, David Fetter <david(at)fetter(dot)org> wrote:
> > 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?
>
> Sure does, and it looks good.
>
> But... will the resulting dump be consistent as far as foreign keys
> are concerned? Or will the current -t warning still apply (YMMV as
> to the consistency of the resulting dump)?

I think the latter is better. This is solidly in the realm of prying
off cover plates, and the warning is already there :)

> If it's my job to ensure foreign key consistency, an option that
> only dumps foreign keys and/or omits the foreign keys from the dump
> would also be essential... Grepping a full dump, as I said, is not
> nice, plus the foreign keys are multi-line which complicates
> grepping.

I think we can avoid a giant rat hole here by not trying to follow
foreign keys. Can we consider following foreign keys a separate
feature for later discussion and just go with the (not totally
trivial) considerations of schema and table inclusion and exclusion?

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

Remember to vote!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hannes Dorbath 2005-10-07 09:17:43 Re: copy data between database
Previous Message WireSpot 2005-10-07 08:47:26 Re: Dump all except some tables?