From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | "Campbell, Lance" <lance(at)illinois(dot)edu> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: enhancement request for pg_restore |
Date: | 2015-08-13 15:56:25 |
Message-ID: | 20150813155625.GF8988@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-08-13 17:37:29 | Re: enhancement request for pg_restore |
Previous Message | Campbell, Lance | 2015-08-13 15:10:21 | enhancement request for pg_restore |