How to solve recusivity probleme with rls
im unable to put rls on all my table because :
infinite recursion detected in policy for relation
7 Replies
If you are selecting from the same table you are putting a select policy on then you need to move the select to a security definer function to bypass RLS.
Row Level Security | Supabase Docs
Using Row Level Security with Supabase Auth.
In fact, I have two tables audio and audiotodo, except that there rls from the audio table calls the audiotodo table and the rls from audiotodo calls the audio table. even with a function that loops to infinity...
OK same solution.
Im really sorry but i don't find the place where i can create security definer function in my supabase interface
You can use the SQL editor or the Functions UI ( select security definer as advanced option)
https://supabase.com/docs/guides/database/functions
Database Functions | Supabase Docs
Creating and using Postgres functions.
WOW Its working, Really, thank you ❤️