I am getting this exception when trying to add a policy that checks if participants are part of transaction. participant is a jsonb array string. it works if i hardcode auth.uid() though.
create or replace function public.get_transactions_for_authenticated_user( user_id uuid)returns setof bigintlanguage sqlsecurity definerset search_path = publicstableas $$ select id from transactions where participants::jsonb ? auth.uid()$$;
create or replace function public.get_transactions_for_authenticated_user( user_id uuid)returns setof bigintlanguage sqlsecurity definerset search_path = publicstableas $$ select id from transactions where participants::jsonb ? auth.uid()$$;
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.