PostgreSQL doesn’t recursively revoke roles

I’m using PostgreSQL 9.4 on Windows 7 SP1 64bit, and I have a problem when revoking roles.
Let’s say I have three users: taylor, michelle and the superuser postgres.
As postgres, I grant the role ‘utente’ to taylor with admin option


Then, as taylor, I grant the role utente to michelle

GRANT utente TO michelle;

Finally, as postgres, I revoke the role utente from taylor

REVOKE utente FROM taylor

The role should have been recursively revoked from michelle too, cause she received the role from taylor only. But it isn’t so, taylor loses the role but michelle keeps it. I tried to run the command with the RESTRICT option, which should prevent it from being executed, but it doesn’t work, the command is executed exactly in the same way, taylor loses the role and michelle keeps it.
Can anyone explain me this please?


Source: sql

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.