Search Postgresql Archives

Re: how drop a role that owns stuff ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andreas wrote:
> Hi,
> for some cleaning up I'd like to drop a certain role.
> Now DROP ROLE yields an error and complains about 271 objects being  
> owned by this role.
>
> Is there an easy way to switch ownership of those objects to another role?

Yes, see REASSIGN OWNED (gives ownership to something else) and DROP
OWNED (drops grants and removes objects owned).  Normally you run both
in that order.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux