The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: Make the broadcast from database functions security definer (#35760)
Tyler87ce4bb8869e
diff --git a/apps/docs/content/guides/realtime/subscribing-to-database-changes.mdx b/apps/docs/content/guides/realtime/subscribing-to-database-changes.mdxindex e766cc30c97..2c06852f177 100644--- a/apps/docs/content/guides/realtime/subscribing-to-database-changes.mdx+++ b/apps/docs/content/guides/realtime/subscribing-to-database-changes.mdx@@ -36,6 +36,7 @@ Let's create a function that we can call any time a record is created, updated,```sqlcreate or replace function public.your_table_changes()returns trigger+security definerlanguage plpgsqlas $$begindiff --git a/apps/www/_blog/2025-04-02-realtime-broadcast-from-database.mdx b/apps/www/_blog/2025-04-02-realtime-broadcast-from-database.mdxindex 80e1f577e49..39938221d9c 100644--- a/apps/www/_blog/2025-04-02-realtime-broadcast-from-database.mdx+++ b/apps/www/_blog/2025-04-02-realtime-broadcast-from-database.mdx@@ -83,6 +83,8 @@ Then, set up the function that will be called whenever a Database change is dete```sqlcreate or replace function public.your_table_changes()returns trigger+security definer+language plpgsqlas $$beginperform realtime.broadcast_changes(@@ -96,7 +98,7 @@ begin);return null;end;-$$ language plpgsql;+$$;```Then, set up the trigger conditions under which you will execute the function: