-- 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 ...
-- study_group_members 의 SELECT 정책이 "같은 그룹 동료" 조회를 위해 -- 자기 자신(study_group_members) 을 EXISTS 서브쿼리로 참조했음. -- PostgreSQL 은 서브쿼리 SELECT 에도 RLS 정책을 적용 → 자기 정책 재귀 발동 → -- "infinite recursion detected in ...