How to generate drop cascade with pg_dump - Mailing list pgsql-sql

From Emi Lu
Subject How to generate drop cascade with pg_dump
Date
Msg-id 50EC9574.9060500@encs.concordia.ca
Whole thread Raw
Responses Re: How to generate drop cascade with pg_dump
List pgsql-sql
Hello,

May I know how to generate drop table cascade when pg_dump a schema please?

E.g.,
pg_dump -h db_server -E UTF8   -n schema_name  -U schema_owner --clean 
-d db_name >! ~/a.dmp

In a.dmp, I'd like to get:

drop table t1 cascade;
drop table t2 cascade;
... ...

Only dropping constraints within a schema is not good enough since there 
are dependencies on other schema.

Thanks a lot!
Emi



pgsql-sql by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: copy users/groups
Next
From: Adrian Klaver
Date:
Subject: Re: How to generate drop cascade with pg_dump