Re: dropping role w/dependent objects

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dropping role w/dependent objects
Date: 2007-04-04 22:48:04
Message-ID: 200704041648.04860.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

On Wednesday April 4 2007 4:41 pm, Ed L. wrote:
> On Wednesday April 4 2007 4:39 pm, Ed L. wrote:
> > On Wednesday April 4 2007 4:35 pm, Alvaro Herrera wrote:
> > > Note that you can give the objects owned by that role to
> > > someone else with REASSIGN OWNED, and drop the objects
> > > with DROP OWNED (note that they act differently regarding
> > > grants; see the docs)
> >
> > Yes, but how do identify what they are so that I know if I
> > want to DROP OWNED them?
>
> The REASSIGN OWNED appears to be insufficient:
>
> % psql -c "reassign owned by mygroup to mydba"
> REASSIGN OWNED
> % psql -c "drop group mygroup"
> ERROR: role "mygroup" cannot be dropped because some objects
> depend on it
> DETAIL: 225 objects in this database

I did a before and after dump to compare. The objects it is
complaining about are GRANTs to that group. Hmm... seems
like you shouldn't have to drop every grant for a group
you're dropping.

Thanks,
Ed

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-04-04 22:48:10 Re: dropping role w/dependent objects
Previous Message Martin Gainty 2007-04-04 22:46:13 Re: dropping role w/dependent objects

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-04-04 22:48:10 Re: dropping role w/dependent objects
Previous Message Martin Gainty 2007-04-04 22:46:13 Re: dropping role w/dependent objects