Re: pg_dump exclusion switches and functions/types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump exclusion switches and functions/types
Дата
Msg-id 4826.1160255442@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump exclusion switches and functions/types  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: pg_dump exclusion switches and functions/types  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Tom Lane <tgl@sss.pgh.pa.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libreadline only used with psql?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Man pages