Re: how drop a role that owns stuff ?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: how drop a role that owns stuff ?
Дата
Msg-id 20090713010456.GA6207@alvh.no-ip.org
обсуждение исходный текст
Ответ на how drop a role that owns stuff ?  (Andreas <maps.on@gmx.net>)
Список pgsql-general
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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Andreas
Дата:
Сообщение: how drop a role that owns stuff ?
Следующее
От: Andreas
Дата:
Сообщение: Design question: Should "postgres" own all the db objects?