infinite recursion for table company_members
Hello, I've ran into an infinite recursion error that happens when using supabase.select to select company_members or companies.
You should the primary key of the companies table is called vat of type text and has an index created for it.
I'm providing a detailed rls policy list:
1. Policies for company_members:
SELECT:
2. Policies for companies:
2 Replies
Replace the EXISTS portion with a security definer function in a non-public schema
You need the security definer function because you can't have a select of the same table the select policy is on. It would then need to run the select policy... recursion.