Re: Views dependency

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Shoaib Mir <shoaibmir(at)gmail(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Views dependency
Date: 2007-03-11 06:38:08
Message-ID: 20070311063808.GA11739@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Shoaib Mir escribió:
> Suppose I have a view:
>
> create view v1 as select * from t1;
>
> and another view as:
>
> create view v2 as select * from v1;
>
> Now is there any query or any catalog table available by which I can get to
> know the dependency (names of views on which v2 depends) for view v2?

Yes, pg_depend has a row for v2 to indicate dependency on the pg_rewrite
row, which in turn has an entry to indicate dependency on v1.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shoaib Mir 2007-03-11 07:46:12 Re: Views dependency
Previous Message Tom Lane 2007-03-11 06:35:32 Re: Views dependency