Re: pg_dump exclusion switches and functions/types

From: David Fetter <david(at)fetter(dot)org>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kris Jurka <books(at)ejurka(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump exclusion switches and functions/types
Date: 2006-10-09 17:17:47
Message-ID: 20061009171747.GG3187@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 09, 2006 at 12:07:29PM -0500, Jim C. Nasby wrote:
> On Sat, Oct 07, 2006 at 06:22:19PM -0700, David Fetter wrote:
> > On Fri, Oct 06, 2006 at 10:28:21PM -0400, Gregory Stark wrote:
> > > Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> > >
> > > > The existing patch's behavior is that "the rightmost switch wins",
> > > > ie, if an object's name matches more than one pattern then it is
> > > > included or excluded according to the rightmost switch it matches.
> > > > This is, erm, poorly documented, but it seems like useful behavior
> > > > so I don't have an objection myself.
> > >
> > > I don't know, it sounds like it's the source of the confusion you
> > > identify later.
> > >
> > > My first thought is that the rule should be to apply all the
> > > inclusion switches (implicitly including everything if there are
> > > none), then apply all the exclusion switches.
> >
> > +1 :)
> >
> > Order-dependent switches are a giant foot gun.
>
> They're also very powerful, as anyone who's ever used them in a
> non-trivial rsync (or rdiff-backup) scenareo can tell you. What if
> you want to exclude all of a schema except for a few objects
> (granted, right now we're limited to just tables...)?

You make an important distinction here, and thanks for doing that. :)

IMHO, order-dependent switches are appropriate for a configuration
file and inappropriate for the command line. The pg_hba.conf file is
a great example of a place where order dependence is a good idea.

Cheers,
D
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-10-09 17:33:46 Re: continuing daily testing of dbt2 against postgresql
Previous Message Jim C. Nasby 2006-10-09 17:07:29 Re: pg_dump exclusion switches and functions/types