Re: How to drop user if objects depend on it - Mailing list pgsql-general

From Tom Lane
Subject Re: How to drop user if objects depend on it
Date
Msg-id 7608.1444243920@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to drop user if objects depend on it  ("Andrus" <kobruleht2@hot.ee>)
Responses Re: How to drop user if objects depend on it  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
"Andrus" <kobruleht2@hot.ee> writes:
>> A little further review shows that DROP OWNED is the way to get rid of
>> leftover privileges.  So in general you need to do REASSIGN OWNED to move
>> the ownership of objects, then DROP OWNED to get rid of privileges granted
>> on non-owned objects, before you can drop a role.

> I tried this in database mydb using script below but still got error
> ERROR:  role "vantaa" cannot be dropped because some objects depend on it
> DETAIL:  privileges for database mydb

The example script works for me.  What PG version are you running?  I have
a vague recollection that we've fixed bugs-of-omission in DROP OWNED in
the past.

            regards, tom lane


pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: using postgresql for session
Next
From: Steve Pribyl
Date:
Subject: Re: backup.old