how to append records from dump to existing database?

Поиск
Список
Период
Сортировка
От wetter wetterana
Тема how to append records from dump to existing database?
Дата
Msg-id CAMPbDaVXXq_XxL7g+h+LRnzocHUGaeRTST+8jZ+F12DH7gtxhg@mail.gmail.com
обсуждение исходный текст
Ответы Re: how to append records from dump to existing database?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Hi,

I would like to know how I could append a database dump to an existing database without clearing it.

Example: I got a database 'db' with a tables 't1' including variables 'var1' and 'var2', and table 't2' with variables 'var3' and 'var4'.  Earlier this year, I stored records 1 to 100 in this database and dumped the whole database to a file 'dump1'.  Then I cleared the tables and began collecting new records 101 - 200.  All variables are the same, no ownership has changed, etc. 

Now I would like to append the records 1-100 from dump1 to the existing database.  How could I use pg_dump or another command to append records 1-100 to the existing database? Please note that I do not have enough space to first recreate the database from the dump and then merge it with the newer one. 

More generally, knowing that I will have to do this periodically, how can I best dump current records to ease later merging/appending?

Thanks!!

Ana    

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

Предыдущее
От: stefano bonnin
Дата:
Сообщение: BDR conpilation error un Ubuntu 12.4 LTS
Следующее
От: Giuseppe Broccolo
Дата:
Сообщение: Re: BDR conpilation error un Ubuntu 12.4 LTS