Re: refreshing a database with pg_dump and psql

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: refreshing a database with pg_dump and psql
Дата
Msg-id CAKFQuwa3M_hDYnbnDdT0e3v=O+1xeDzkdgs1Ssan2eo=Sa70KQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: refreshing a database with pg_dump and psql  (Jan Lentfer <Jan.Lentfer@web.de>)
Ответы Re: refreshing a database with pg_dump and psql  (Jan Lentfer <Jan.Lentfer@web.de>)
Список pgsql-admin
On Tue, May 26, 2015 at 2:27 PM, Jan Lentfer <Jan.Lentfer@web.de> wrote:

Am 26.05.2015 um 23:09 schrieb Rossi, Maria <maria.rossi@us.pgds.com>:

Hi,

 

I have a database that was created from a ‘pg_dump –C’.  No problems there.  Then  I ran the pg_dump  again, this time without the –C. and tried to load it.   But   got a bunch of ‘object already exist’.   

Can’t I refresh an existing database from a plain pg_dump?  Is  there an option that I have to use?

Thanks.

 

Check the pg_restore manual. There is a "clean" option when using the custom format. I think this is what you are looking for.


​Or just inject a "DROP DATABASE ..." into the equation somewhere.

David J.​
 

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

Предыдущее
От: "Rossi, Maria"
Дата:
Сообщение: Re: refreshing a database with pg_dump and psql
Следующее
От: Jan Lentfer
Дата:
Сообщение: Re: refreshing a database with pg_dump and psql