Protecting reserved roles with PostgreSQL Hooks
How-to 10 min +100 XP
Supabase grants customers the CREATEROLE privilege while preventing them from altering or dropping its internal service roles (like supabase_storage_admin) via a C extension, SupaUtils, that hooks PostgreSQL's ProcessUtility_hook.