Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYBsY-0000PR-Cz for pgsql-docs@arkaria.postgresql.org; Fri, 12 Aug 2016 12:48: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 1bYBsX-000519-Ul for pgsql-docs@arkaria.postgresql.org; Fri, 12 Aug 2016 12:48:01 +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 1bYBsX-00050Z-3E for pgsql-docs@postgresql.org; Fri, 12 Aug 2016 12:48:01 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bYBsT-0003E2-CX for pgsql-docs@postgresql.org; Fri, 12 Aug 2016 12:48:00 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id BA35E20422; Fri, 12 Aug 2016 08:47:55 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 12 Aug 2016 08:47:55 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=4S7Bu8T5aMsNIza F3zHIKl21kFQ=; b=BLa/AT4rW+/8p8Qt0QzHZF2lCAHROOY6uei1a3OzPitvUD8 8ueZSfiL3ModwfulBuZQ+FLgztyFkClZpiwW0fLX25YQQXl63aRx2lHUEBiD0ZQ3 0zlWqp7A7Byk+hrcJv5Weu1BSfSTYWwiAswKsB2pQ9TU4ID2+CWvigyCnqjM= X-Sasl-enc: uJXnGG0AERec02DH79BXOMlYQfmb9kyFnUoLJRT3T5dJ 1471006075 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 6AE2ECCE66; Fri, 12 Aug 2016 08:47:55 -0400 (EDT) Subject: Re: Undocumented behavior od DROP SCHEMA ... CASCADE To: denisa.cirstescu@asentinel.com, pgsql-docs@postgresql.org References: <20160805104837.1412.84915@wrigleys.postgresql.org> From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Fri, 12 Aug 2016 08:47:55 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160805104837.1412.84915@wrigleys.postgresql.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 On 8/5/16 6:48 AM, denisa.cirstescu@asentinel.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: "CASCADE - Automatically drop objects > (tables, functions, etc.) that are contained in the schema.". > 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 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs