The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Adds the search path to the security definer function
Copplea224d0a513df
diff --git a/web/docs/guides/auth.mdx b/web/docs/guides/auth.mdxindex a6d8ce0eae9..42c204ec59d 100644--- a/web/docs/guides/auth.mdx+++ b/web/docs/guides/auth.mdx@@ -258,11 +258,15 @@ alter table members-- 3. Create security definer functioncreate or replace function get_teams_for_user(user_id uuid)-returns setof bigint as $$+returns setof bigint+language sql+security definer+SET search_path = public+as $$select team_idfrom memberswhere user_id = $1-$$ stable language sql security definer;+$$;-- 4. Create Policycreate policy "Team members can update team members if they belong to the team."