When trying to drop a user who owns some tables or other database objects, you get the following error, and the user is not dropped:
testdb=# drop user bob;
ERROR: role “bob” cannot be dropped because some objects depend on it
DETAIL: owner of table bobstable
owner of sequence bobstable_id_seq
This recipe presents two solutions to this problem.