Re: DROP ROLE dependency tracking ...

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Hans-Juergen Schoenig <postgres(at)cybertec(dot)at>
Cc: PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DROP ROLE dependency tracking ...
Date: 2008-05-25 12:56:49
Message-ID: 20080525125649.GC24891@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hans-Juergen Schoenig wrote:

> test=# create role xy LOGIN;
> CREATE ROLE
>
> test=# grant connect on database test to xy;
> GRANT
>
> test=# drop role xy;
> ERROR: role "xy" cannot be dropped because some objects depend on it
> DETAIL: access to database test
>
> this is a totally fresh instance --- all i did was creating a db called
> "test".
> failing would make sense if i would the owner of an object but i fact i
> don't own anything.

But in some cases you might not want to lose the information associated
to the grants you've done. That's why we have REASSIGN OWNED.

Hmm, but then there's no way to lose it, even if you do want that. DROP
OWNED does not touch grants (which is per design), but we don't have
DROP ROLE CASCADE. So maybe there's a functionality gap here ...

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hans-Juergen Schoenig 2008-05-25 13:32:32 Re: DROP ROLE dependency tracking ...
Previous Message Hans-Juergen Schoenig 2008-05-25 12:27:46 Re: [HACKERS] WITH RECURSIVE patch V0.1