Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6jY4-00089r-Kk for pgsql-sql@arkaria.postgresql.org; Fri, 24 Jan 2014 16:24:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W6jY4-0005xb-2D for pgsql-sql@arkaria.postgresql.org; Fri, 24 Jan 2014 16:24:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6jY2-0005wY-Tr for pgsql-sql@postgresql.org; Fri, 24 Jan 2014 16:24:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6jXw-0006Sm-Cd for pgsql-sql@postgresql.org; Fri, 24 Jan 2014 16:24:02 +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 s0OGNK2t013661; Fri, 24 Jan 2014 11:23:20 -0500 From: Tom Lane To: emilu@encs.concordia.ca cc: pgsql-sql Subject: Re: find all views depend on a schema/table In-reply-to: <52E28D0D.3080908@encs.concordia.ca> References: <52E28D0D.3080908@encs.concordia.ca> Comments: In-reply-to Emi Lu message dated "Fri, 24 Jan 2014 10:55:57 -0500" Date: Fri, 24 Jan 2014 11:23:20 -0500 Message-ID: <13660.1390580600@sss.pgh.pa.us> 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 Emi Lu writes: > 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: begin; drop table some_table restrict; ... note what it complains about ... rollback; regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql