-- Each subquery re-triggered the other table's RLS, causing: -- infinite recursion detected in policy for relation "requests" -- (surfaces on the first authenticated SELECT of requests, e.g.
-- when checking admin status, breaking the recursion. -- ── 1. Create a SECURITY DEFINER helper to check admin role ────────────────── -- This function bypasses RLS entirely, so no recursion when ...
一些您可能无法访问的结果已被隐去。
显示无法访问的结果