Re: Undocumented behavior od DROP SCHEMA ... CASCADE - Mailing list pgsql-docs

From Alvaro Herrera
Subject Re: Undocumented behavior od DROP SCHEMA ... CASCADE
Date
Msg-id 20160812205508.GA714477@alvherre.pgsql
Whole thread Raw
In response to Re: Undocumented behavior od DROP SCHEMA ... CASCADE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Undocumented behavior od DROP SCHEMA ... CASCADE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
Tom Lane wrote:

> I'm inclined to suggest that maybe the generic phrasing could be
> "Automatically drop objects that depend on the <whatever> [(such as ...)],
> and in turn all objects that depend on those objects".

I think it'd be a good idea to add some more discoverability: what would
be deleted if an object X were to be deleted?  I suppose this is just a
recursive query on pg_depend, but expecting users to handle that on
their own is preposterous.  We could offer a simple function, to which
you pass classid, objid, objsubid, returns setof same plus obj_description.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Undocumented behavior od DROP SCHEMA ... CASCADE
Next
From: Tom Lane
Date:
Subject: Re: Undocumented behavior od DROP SCHEMA ... CASCADE