Dependencies of Matviews? - Mailing list pgsql-general

From Thomas Kellerer
Subject Dependencies of Matviews?
Date
Msg-id 800f556a-29cf-3528-d720-84e7eae8ad45@gmx.net
Whole thread Raw
Responses Re: Dependencies of Matviews?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: getting daily stats for event counts
Next
From: Edu Gargiulo
Date:
Subject: Re: pg_dump empty tables