"Andrus" <kobruleht2(at)hot(dot)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