pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <shammat@gmx.net>
To: Postgres General <pgsql-general@postgresql.org>
Subject: Dependencies of Matviews?
Date: Tue, 23 Jun 2020 18:39:37 +0200
Message-ID: <800f556a-29cf-3528-d720-84e7eae8ad45@gmx.net> (raw)

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






view thread (3+ messages)  latest in thread

Message-ID: <800f556a-29cf-3528-d720-84e7eae8ad45@gmx.net>
Permalink:  ../800f556a-29cf-3528-d720-84e7eae8ad45@gmx.net/
Also on:    postgresql.org/message-id/800f556a-29cf-3528-d720-84e7eae8ad45@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: shammat@gmx.net
  Subject: Re: Dependencies of Matviews?
  In-Reply-To: <800f556a-29cf-3528-d720-84e7eae8ad45@gmx.net>
  References: <800f556a-29cf-3528-d720-84e7eae8ad45@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox