Re: pg_dump exclusion switches and functions/types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: 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-07 21:10:42
Message-ID: 4826.1160255442@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> 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.

> 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.

I kinda like that, because it makes the behavior completely independent
of switch ordering, which seems like a good property to preserve.
Anyone else have an opinion pro or con?

> That leads to including non-schema objects only if there are no schema
> inclusion switches. Which seems pretty logical since if you're explicitly
> including objects then you'll only expect objects explicitly included to be
> dumped and you'll quickly realize there's no switch to bring in those
> non-schema objects. Maybe there should be a switch to include them just for
> completeness.

Well, pg_dump already has a --blobs switch, which has been a no-op
(because now the default) since 8.1, but it's still in the switch
parser. It wouldn't take much to revive it for the purpose of causing
blobs to be dumped even when there's an inclusion switch. As for PLs,
I'm not really too worried about dumping them per se (since it's usually
easy enough to create the ones you're using). The functionality we're
really lacking there is the "--include-dependencies" switch that was
discussed upthread ... which I think is a fine idea but should wait for
8.3.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-10-07 21:18:49 Man pages
Previous Message Tom Lane 2006-10-07 20:34:10 Re: libreadline only used with psql?