Re: Undocumented behavior od DROP SCHEMA ... CASCADE

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 22:28:36
Message-ID: 20160812222836.GA722084@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

David G. Johnston wrote:

> If we are looking to improve things here I'd at least consider having the
> default cascade to be safe and not drop persisted data (I suppose that
> could functions linked to functional indexes...) and have a separate flag
> that would also be permitted to destroy data. Having such a dependency
> listing query distinguish between data-loss and other would be a good
> intermediate step.

Well, if you happen to drop a view for which you no longer have the
definition, you may be similarly screwed. I prefer the approach that we
consider all drops as potentially dangerous.

--
Á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 22:48:51 Re: Undocumented behavior od DROP SCHEMA ... CASCADE
Previous Message Alvaro Herrera 2016-08-12 22:26:11 Re: Undocumented behavior od DROP SCHEMA ... CASCADE