From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeremy Finzel <finzelj(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Dependency tree to tie type/function deps to a table |
Date: | 2017-12-13 15:54:59 |
Message-ID: | CANu8FiwU1LsBcNz5wp__tby1CXpTEN99HDfFHiQeoJ8g0d83JA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Dec 13, 2017 at 10:20 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jeremy Finzel <finzelj(at)gmail(dot)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
>
>
Jeremy ,
per Tom
>Seems like you could build a query...
Attached is the query that I use. Hope that helps you.
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
Attachment | Content-Type | Size |
---|---|---|
table_dependents.sql | text/plain | 768 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Yogesh Sharma | 2017-12-13 16:55:13 | Re: Size of pg_multixact/members increases 11355 |
Previous Message | Nicola Contu | 2017-12-13 15:49:04 | pgstattuple free_percent to high |