Skip site navigation (1) Skip section navigation (2)

restore message . . . cascade

From: "Marc Fromm" <Marc(dot)Fromm(at)wwu(dot)edu>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: restore message . . . cascade
Date: 2008-03-25 19:31:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I am backing up my databases with pgdump -c command to prevent duplicate
records during a restore.

When I restore the database with this command: 
	psql -U postgres infoserv < /tmp/infoserv-03-25-2008_12-10
I get the message to use cascade to drop dependent objects.

ERROR:  cannot drop schema public because other objects depend on it
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
ERROR:  schema "public" already exists

1.) If the schema is not dropped during the restore, is stuff in the
schema being duplicated? 
2.) What flag can I add to the pgdump command to initiate the cascade? 
3.) Is it best practice to drop the schema and dependant objects?



pgsql-admin by date

Next:From: kevin kempterDate: 2008-03-25 20:10:07
Subject: Deferred Constraints Issues
Previous:From: Tena SakaiDate: 2008-03-25 18:25:14
Subject: Re: it refuses to go down...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group