Recommended Procedure for Archiving Table Data

Поиск
Список
Период
Сортировка
От Sally Ruggero
Тема Recommended Procedure for Archiving Table Data
Дата
Msg-id 004001c4bd4a$8031e680$3500030a@Sally
обсуждение исходный текст
Ответы Re: Recommended Procedure for Archiving Table Data  (Andreas Pflug <pgadmin@pse-consulting.de>)
Список pgadmin-support
I need advice on archiving data from our production database.
 
Each night I would like to save and remove a day's data from two weeks ago, from all the tables. I know how to delete the data--though our schema does not specify cascaded deletes. However, I can't figure out how to save the desired data. I'd like to save it in SQL insert statement format, but I can't see how to get the data out. If I use psql to create a temp table with the old data in it, then the table disappears when I exit psql and I can't dump it with pg_dump. If I make a new table and put the data in it, then when I dump it with pg_dump, all the insert statements have the new table name rather than the original table name. I'm sure there's a good solution for this standard problem. Does anyone have a suggestion?
 
Thanks,
Sally

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

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: pgAdmin III v1.2 Beta-3: Problem with "alter
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: Recommended Procedure for Archiving Table Data