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