Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYLGA-0007FA-Jq for pgsql-docs@arkaria.postgresql.org; Fri, 12 Aug 2016 22:49:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bYLGA-00083s-3W for pgsql-docs@arkaria.postgresql.org; Fri, 12 Aug 2016 22:49:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bYLG9-00083X-Ey for pgsql-docs@postgresql.org; Fri, 12 Aug 2016 22:49:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bYLG6-0006Yt-R8 for pgsql-docs@postgresql.org; Fri, 12 Aug 2016 22:49:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u7CMmpg2029388; Fri, 12 Aug 2016 18:48:51 -0400 From: Tom Lane To: Alvaro Herrera cc: "David G. Johnston" , Vik Fearing , Peter Eisentraut , denisa.cirstescu@asentinel.com, "pgsql-docs@postgresql.org" Subject: Re: Undocumented behavior od DROP SCHEMA ... CASCADE In-reply-to: <20160812222836.GA722084@alvherre.pgsql> References: <20160812222836.GA722084@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 12 Aug 2016 18:28:36 -0400" Date: Fri, 12 Aug 2016 18:48:51 -0400 Message-ID: <29387.1471042131@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Alvaro Herrera writes: > 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. There's also the minor problem that the SQL standard is quite clear about what DROP CASCADE means, and it ain't that. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs