I would like to extract the dependency between materialized views.

e.g. in the following situation:

   create materialized view mv1 as select ....;
   create materialized view mv2 as select ... from mv1, ...;

I would like to know that mv2 depends on mv1.

I assumed this could be done through pg_depend, but the only dependency I see 
there for the matviews is the one for the namespace.

Clearly this information is stored somehow, as a DROP MATERIALIZED VIEW 
complains about being referenced by other matviews.

Am I missing something in pg_depend or do I need to look in a different system 
table?

Regards
Thomas



Reply via email to