postgresql cannot delete role code example
Example: unable to delete a role in postgres
REASSIGN OWNED BY ryan TO postgres; -- or some other trusted role
DROP OWNED BY ryan;
-- repeat in ALL databases where the role owns anything or has any privileges!
DROP USER ryan;