Re: Dump all except some tables?

Поиск
Список
Период
Сортировка
От WireSpot
Тема Re: Dump all except some tables?
Дата
Msg-id b2d4b0380510070147j3e2b236fn19541297d8614095@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Dump all except some tables?  (David Fetter <david@fetter.org>)
Ответы Re: Dump all except some tables?  (David Fetter <david@fetter.org>)
Список pgsql-general
On 10/7/05, David Fetter <david@fetter.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)?

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.

If both table filtering and the foreign key options would be
implemented, one could truly do useful dumps using pg_dump alone. I
could dump only some tables sans the foreign keys, then dump the
foreign keys separately and take it from there.

I know that I can get the foreign keys from a schema-only dump. But an
"don't dump foreign keys" option would still help.

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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Shell script to extract a table from a plain text dump
Следующее
От: David Fetter
Дата:
Сообщение: Re: Dump all except some tables?