Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6kB2-0001HX-Mg for pgsql-sql@arkaria.postgresql.org; Fri, 24 Jan 2014 17:04:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W6kB2-0000vT-6y for pgsql-sql@arkaria.postgresql.org; Fri, 24 Jan 2014 17:04:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6kB1-0000vN-Ic for pgsql-sql@postgresql.org; Fri, 24 Jan 2014 17:04:19 +0000 Received: from oldperseverance.encs.concordia.ca ([132.205.96.92]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6kAu-0007DA-Rv for pgsql-sql@postgresql.org; Fri, 24 Jan 2014 17:04:19 +0000 Received: from cacao.encs.concordia.ca (emilu@cacao.encs.concordia.ca [132.205.47.225]) by oldperseverance.encs.concordia.ca (envelope-from emilu@encs.concordia.ca) (8.13.7/8.13.7) with ESMTP id s0OH4BRB020440; Fri, 24 Jan 2014 12:04:12 -0500 Message-ID: <52E29D0B.4000201@encs.concordia.ca> Date: Fri, 24 Jan 2014 12:04:11 -0500 From: Emi Lu Reply-To: emilu@encs.concordia.ca User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11 MIME-Version: 1.0 To: Tom Lane CC: pgsql-sql Subject: Re: find all views depend on a schema/table References: <52E28D0D.3080908@encs.concordia.ca> <13660.1390580600@sss.pgh.pa.us> In-Reply-To: <13660.1390580600@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on oldperseverance.encs.concordia.ca at 2014/01/24 12:04:12 EST X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org >> Is there a simple way to query all views depend on a schema or table? > Well, you could build something that examines pg_depend, or you could > try this: Thank you. I will try to find mapped results for pg_depend. > begin; > drop table some_table restrict; > ... note what it complains about ... > rollback; No... to find all views(not in schema1) depend on any schema1.objects. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql