-- prevent deleting or changing default roles
create rule protect_special_roles_update as
on update to "role"
where old."name" = 'admin' or old."name" = 'member'
do instead nothing;

create rule protect_special_roles_delete as
on delete to "role"
where old."name" = 'admin' or old."name" = 'member'
do instead nothing;
