Re: enhancement request for pg_restore

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: enhancement request for pg_restore
Дата
Msg-id 20150813155625.GF8988@awork2.anarazel.de
обсуждение исходный текст
Ответ на enhancement request for pg_restore  ("Campbell, Lance" <lance@illinois.edu>)
Ответы Re: enhancement request for pg_restore  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
Hi Lance,

On 2015-08-13 15:10:21 +0000, Campbell, Lance wrote:
> PostgreSQL 9.4.x
>
> I love using the PostgreSQL database.  It is wonderful.

Good to hear!

> Please consider adding to pg_restore the command line option to exclude one or more tables similar to the pg_dump
option.
>
> Example:
>
> --exclude-table=table
>
> Why?  I like to restore all tables within a particular namespace from
> our production database to our test database.  But there are many
> times when you have some tables that hold data you don't necessarily
> need information from.  In those cases I would exclude those tables.
> I would then do a second pg_restore so I could get the schema for
> those particular tables.

You can kind of do this today using pg_restore's --list parameter to
dump the list of objects in the archive, then remove the objects you
don't need/want, and then use --use-list to restore only the remaining
objects.

Greetings,

Andres Freund


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

Предыдущее
От: "Campbell, Lance"
Дата:
Сообщение: enhancement request for pg_restore
Следующее
От: Tom Lane
Дата:
Сообщение: Re: enhancement request for pg_restore