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 ...
-- but that SELECT itself triggers the profiles RLS policies, causing infinite recursion. -- The fix: use a SECURITY DEFINER function to bypass RLS when checking admin status, -- and also use auth.jwt ...