Re: How can I look at a recursive table dependency tree?

Поиск
Список
Период
Сортировка
От Emi Lu
Тема Re: How can I look at a recursive table dependency tree?
Дата
Msg-id 4A2008EE.20901@encs.concordia.ca
обсуждение исходный текст
Ответ на Re: How can I look at a recursive table dependency tree?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Ответы Re: How can I look at a recursive table dependency tree?  (Greg Stark <stark@enterprisedb.com>)
Список pgsql-general
A. Kretschmer wrote:
> In response to Igor Katson :
>> I want to DROP CASCADE a table, but I am afraid that amoung numerous
>> recursive dependencies there will be smth, that I don't want to drop.
>>
>> Is there a way to watch all dependencies recursively without doing a drop?
>
> You can walk through pg_depend.

Is it possible to find all view names depend on one table?

For example,

create table t1;
create view v1 as select * from t1;
create view v2 as select ... from v1;

To get all dependencies based on t1:

returns

t1   | v1
t1   | v2


--
Lu Ying

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: optimize/cleanup SQL
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Transaction settings: nowait