Re: Best way to list a role s owned objects? - Mailing list pgsql-general

From Tom Lane
Subject Re: Best way to list a role s owned objects?
Date
Msg-id 17873.1404241035@sss.pgh.pa.us
Whole thread Raw
In response to Re: Best way to list a roles owned objects?  (Jerry Sievers <gsievers19@comcast.net>)
List pgsql-general
Jerry Sievers <gsievers19@comcast.net> writes:
> Felipe Gasper <felipe@felipegasper.com> writes:
>> Every database on the cluster, individually, then? Is there no way to
>> query all databases at once?
>> I mean, *something* under the hood must be doing this because DROP
>> ROLE bugs out if the role owns anything in any DB.

> That is made possible by pg_shdepend catalog which makes note of shared
> dependencies however it will *not*  inform you of what specific objects
> are depending unless you visit each such DB to find out.

Yeah.  You can identify the kind of object represented by each entry,
since classid values are common to all databases; but you can't resolve
any more information than that unless you connect to the DB in question.
This is because you can only "see" a given DB's system catalogs when
connected to that DB.

            regards, tom lane


pgsql-general by date:

Previous
From: Jerry Sievers
Date:
Subject: Re: Best way to list a roles owned objects?
Next
From: Jeff Janes
Date:
Subject: Re: lock contention, need profiling idea