Re: find all views depend on a schema/table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: emilu(at)encs(dot)concordia(dot)ca
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: find all views depend on a schema/table
Date: 2014-01-24 16:23:20
Message-ID: 13660.1390580600@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Emi Lu <emilu(at)encs(dot)concordia(dot)ca> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Adrian Klaver 2014-01-24 16:29:09 Re: consulting the question about the usage about SSH Tunnel function
Previous Message Emi Lu 2014-01-24 15:55:57 find all views depend on a schema/table