pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Emi Lu <emilu@encs.concordia.ca>
To: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: How to generate drop cascade with pg_dump
Date: Tue, 08 Jan 2013 16:53:56 -0500
Message-ID: <50EC9574.9060500@encs.concordia.ca> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (2+ messages)  latest in thread

Message-ID: <50EC9574.9060500@encs.concordia.ca>
Permalink:  ../50EC9574.9060500@encs.concordia.ca/
Also on:    postgresql.org/message-id/50EC9574.9060500@encs.concordia.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: emilu@encs.concordia.ca
  Subject: Re: How to generate drop cascade with pg_dump
  In-Reply-To: <50EC9574.9060500@encs.concordia.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox