Re: Undocumented behavior od DROP SCHEMA ... CASCADE

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: denisa(dot)cirstescu(at)asentinel(dot)com, pgsql-docs(at)postgresql(dot)org
Subject: Re: Undocumented behavior od DROP SCHEMA ... CASCADE
Date: 2016-08-12 12:47:55
Message-ID: fbb1360b-e450-aaf6-19bd-9bfcffb35ed7@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 8/5/16 6:48 AM, denisa(dot)cirstescu(at)asentinel(dot)com wrote:
> Page: https://www.postgresql.org/docs/9.5/static/sql-dropschema.html
> Description:
>
> DROP SCHEMA ... CASCADE has a behavior that has not been documented.
> According to the documentation: &quot;CASCADE - Automatically drop objects
> (tables, functions, etc.) that are contained in the schema.&quot;.
> Well, besides this, DROP SCHEMA ... CASCADE also drops all the views which
> depends on the schema that is being dropped. It does not matter if the views
> are in the public schema or another schema than the one being dropped, they
> are deleted.

Can you give an example?

--
Peter Eisentraut 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 Vik Fearing 2016-08-12 12:54:44 Re: Undocumented behavior od DROP SCHEMA ... CASCADE
Previous Message Simon Riggs 2016-08-12 09:37:44 Re: Wording in TABLESAMPLE documentation