pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Vik Fearing <vik@2ndquadrant.fr>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: denisa.cirstescu@asentinel.com, "pgsql-docs@postgresql.org" <pgsql-docs@postgresql.org>
Subject: Re: Undocumented behavior od DROP SCHEMA ... CASCADE
Date: Fri, 12 Aug 2016 18:48:51 -0400
Message-ID: <29387.1471042131@sss.pgh.pa.us> (raw)
In-Reply-To: <20160812222836.GA722084@alvherre.pgsql>
References: <20160812222836.GA722084@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

Alvaro Herrera <alvherre@2ndquadrant.com> 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



view thread (15+ messages)  latest in thread

Message-ID: <29387.1471042131@sss.pgh.pa.us>
Permalink:  ../29387.1471042131@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29387.1471042131@sss.pgh.pa.us

 · 

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-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, david.g.johnston@gmail.com, vik@2ndquadrant.fr, peter.eisentraut@2ndquadrant.com
  Subject: Re: Undocumented behavior od DROP SCHEMA ... CASCADE
  In-Reply-To: <29387.1471042131@sss.pgh.pa.us>

* 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