Suggested enhancement to pg_restore - Mailing list pgsql-general

From Michael Nolan
Subject Suggested enhancement to pg_restore
Date
Msg-id CAOzAquJ48+TZLmpaCUCfE0J3ugyn_efTr+-vnWq2s5wDVhaxTQ@mail.gmail.com
Whole thread Raw
Responses Re: Suggested enhancement to pg_restore
List pgsql-general
I suggest adding the following parameter to pg_restore:

--rename-table=XXXX

When used in conjunction with the --data-only, --schema and -t options (all three of which would be necessary),
it would allow restoring a table (without indexes) to a different table name (which would need to already exist
and match the structure of the table which is being restored, of course.)

This would give PostgreSQL users the ability to reload a table from a dump file to a separate table name in the
same database and schema. 

In other words, this command:

pg_restore --data-only --schema=abc -t xyz --rename-table=xyz_copy

would restore a copy of table xyz into the existing (and presumably empty) table xyz_copy, leaving table xyz untouched.
--
Mike Nolan
nolan@tssi.com

pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: heavy load-high cpu itilization
Next
From: Greg Smith
Date:
Subject: Re: 100 times faster than mysql