Restoring a table with a different name - Mailing list pgsql-general

From Mike Nolan
Subject Restoring a table with a different name
Date
Msg-id 200402272319.i1RNJnOZ003260@gw.tssi.com
Whole thread Raw
Responses Re: Restoring a table with a different name
List pgsql-general
I have a 600K row table on my production system (running 7.3.3)
that I dump and load on my development system (7.4.1) every night using
cron jobs.

I would like to be able to restore the table under a different table name
without first having to play games with the development copy of the table.

If I edit the dump file with 'sed' to change the table name, I get
'invalid command \N' errors trying to reload it.

If I create the dump using inserts instead of load, inserting 600K
records takes too long.

The best solution I've come up with so far is to copy the table on the
production system to the new table name, then dump and restore it.

Is there an easier way to do this?
--
Mike Nolan

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: efficient storing of urls
Next
From: Robert Treat
Date:
Subject: clear defunct entries from pg_stat_activity