-- EXISTS (SELECT 1 FROM public.profiles p WHERE p.id = auth.uid() AND p.role = 'admin') -- This queries the `profiles` table FROM WITHIN a policy ON `profiles`. -- Supabase evaluates RLS on every ...
If you are a SQL programmer, learning recursive SQL techniques can be a boon to your productivity. A recursive query is one that refers to itself. I think the best way to quickly grasp the concept of ...
drop policy if exists "teachers_manage_own_classrooms" on public.classrooms; drop policy if exists "students_read_joined_classrooms" on public.classrooms; drop policy if exists ...
A mind-juggling puzzle indeed! Sharing if you try solve it without using recursion at all and without checking the comments and ChatGPT 😄 . Hint: If you know how to generate a number series in SQL, ...