Re: Undocumented behavior od DROP SCHEMA ... CASCADE

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Vik Fearing <vik(at)2ndquadrant(dot)fr>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, denisa(dot)cirstescu(at)asentinel(dot)com, "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Undocumented behavior od DROP SCHEMA ... CASCADE
Date: 2016-08-12 20:55:08
Message-ID: 20160812205508.GA714477@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2016-08-12 21:01:27 Re: Undocumented behavior od DROP SCHEMA ... CASCADE
Previous Message Tom Lane 2016-08-12 20:32:11 Re: Undocumented behavior od DROP SCHEMA ... CASCADE