Restoring a table with a different name

Поиск
Список
Период
Сортировка
От Mike Nolan
Тема Restoring a table with a different name
Дата
Msg-id 200402272319.i1RNJnOZ003260@gw.tssi.com
обсуждение исходный текст
Ответы Re: Restoring a table with a different name  ("Jim Wilson" <jimw@kelcomaine.com>)
Список 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 по дате отправления:

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: efficient storing of urls
Следующее
От: Robert Treat
Дата:
Сообщение: clear defunct entries from pg_stat_activity