Use (select auth.uid()) instead of auth.uid() in policies | BeforeMerge Rules | BeforeMerge