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

From Felipe Gasper
Subject Best way to list a role’s owned objects?
Date
Msg-id 53B2F904.5030801@felipegasper.com
Whole thread Raw
Responses Re: Best way to list a role’s owned objects?  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Hi all,

    What is the best way to list a role’s owned objects in any database?

    My problem is that I need to be able to “FORCE DROP ROLE” by taking any
objects that that role owns, in any database, and reassigning them to
the “postgres” user.

    Even if REASSIGN OWNED BY worked for this purpose (it only works on the
current database), I would still need a way to display to the API caller
which objects were reassigned.

    Oh, and this preferably needs to work all the way back to PostgreSQL
8.1. :-<

    Any ideas?

    Thanks!

-Felipe Gasper
Houston, TX


pgsql-general by date:

Previous
From: David G Johnston
Date:
Subject: Re: how to create a role with no privileges?
Next
From: John R Pierce
Date:
Subject: Re: Best way to list a role’s owned objects?