From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeremy Finzel <finzelj@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Dependency tree to tie type/function deps to a table
Date: Wed, 13 Dec 2017 10:20:31 -0500
Message-ID: <29504.1513178431@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMa1XUj6FBQ2USDa53TKquHAjRZwSrTwNDSnaTm=11wjdq4Nsg@mail.gmail.com>
References: <CAMa1XUj6FBQ2USDa53TKquHAjRZwSrTwNDSnaTm=11wjdq4Nsg@mail.gmail.com>
Jeremy Finzel <finzelj@gmail.com> writes:
> It looks like the very useful dependency tree shown when using DROP CASCADE
> is written in C in dependency.c, but there is no way to leverage this
> within Postgres to actually query an object's dependencies. Can we get
> this somehow as a Postgres client in SQL?
Seems like you could build a query for that easily enough using a
recursive union over pg_depend plus pg_describe_object() to produce
text descriptions of the entries.
regards, tom lane
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: tgl@sss.pgh.pa.us, finzelj@gmail.com
Subject: Re: Dependency tree to tie type/function deps to a table
In-Reply-To: <29504.1513178431@sss.pgh.pa.us>
References: <CAMa1XUj6FBQ2USDa53TKquHAjRZwSrTwNDSnaTm=11wjdq4Nsg@mail.gmail.com> <29504.1513178431@sss.pgh.pa.us>
* 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