Re: refreshing a database with pg_dump and psql

From: Jan Lentfer <Jan(dot)Lentfer(at)web(dot)de>
To: "Rossi, Maria" <maria(dot)rossi(at)us(dot)pgds(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: refreshing a database with pg_dump and psql
Date: 2015-05-26 21:27:51
Message-ID: C923B445-0BFB-4113-8BF5-873244A97B75@web.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> Am 26.05.2015 um 23:09 schrieb Rossi, Maria <maria(dot)rossi(at)us(dot)pgds(dot)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.

Regards

Jan

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rossi, Maria 2015-05-26 21:27:58 Re: refreshing a database with pg_dump and psql
Previous Message David G. Johnston 2015-05-26 21:25:49 Re: refreshing a database with pg_dump and psql