Re: Include the dependent extension information in describe command. - Mailing list pgsql-hackers

From vignesh C
Subject Re: Include the dependent extension information in describe command.
Date
Msg-id CALDaNm33PH-2S8e2Xc4csoMqZQ+PermhnBVKjyqEMqBnMzh8kw@mail.gmail.com
Whole thread Raw
In response to Re: Include the dependent extension information in describe command.  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Tue, Aug 16, 2022 at 9:04 PM Bruce Momjian <bruce@momjian.us> wrote:
>
> On Mon, Aug 15, 2022 at 10:09:29PM +0530, vignesh C wrote:
> > I have updated the patch to display "Objects depending on extension"
> > as describe extension footer. The changes for the same are available
> > in the v2 version patch attached. Thoughts?
>
> I wonder if we would be better off with a backslash command that showed
> the dependencies of any object.

Yes, If we have a backslash command which could show the dependencies
of the specified object could be helpful.
Can we something like below:
a) Index idx1 depend on table t1
create table t1(c1 int);
create index idx1 on t1(c1);
postgres=# \dD idx1
Name
---------
idx1
Depends on:
    table t1

b) Index idx1 depend on table t1 and extension ext1
alter index idx idx1 depends on extension ext1
postgres=# \dD idx1
Name
---------
idx1
Depends on:
    table t1
    extension ext1

c) materialized view mv1 depends on table t1
create materialized view mv1 as select  * from t1;
postgres=# \dD mv1
Name
---------
mv1
Depends on:
    table t1

If you are ok with this approach, I can implement a patch on similar
lines. Thoughts?

Regards,
Vignesh



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Inconsistencies around defining FRONTEND
Next
From: Jacob Champion
Date:
Subject: Re: CFM Manager