From dfdfe279dff69d20b054ed70bb4dadde2cc00032 Mon Sep 17 00:00:00 2001 From: Thomas Hammerl Date: Thu, 5 Mar 2026 17:05:45 +0100 Subject: [PATCH] docs: Fix SQL queries in realtime documentation (#41519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm relatively new to supabase, but in my current understanding the SQL selects are inconsistent with the given example schema as the column is named `room_topic` there. ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. Yes. ## What kind of change does this PR introduce? Updates documentation. ## Summary by CodeRabbit ## Release Notes * **Documentation** * Corrected authorization policy examples in realtime guides to use accurate column references for topic-based access control in Broadcast and Presence features. ✏️ Tip: You can customize this high-level summary in your review settings. Co-authored-by: Chris Chinchilla --- apps/docs/content/guides/realtime/authorization.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/docs/content/guides/realtime/authorization.mdx b/apps/docs/content/guides/realtime/authorization.mdx index 4bdb5850eab..26ad20d965d 100644 --- a/apps/docs/content/guides/realtime/authorization.mdx +++ b/apps/docs/content/guides/realtime/authorization.mdx @@ -133,7 +133,7 @@ exists ( rooms_users where user_id = (select auth.uid()) - and topic = (select realtime.topic()) + and room_topic = (select realtime.topic()) and realtime.messages.extension in ('broadcast') ) ); @@ -266,7 +266,7 @@ with check ( rooms_users where user_id = (select auth.uid()) - and topic = (select realtime.topic()) + and room_topic = (select realtime.topic()) and realtime.messages.extension in ('broadcast') ) ); @@ -293,7 +293,7 @@ using ( rooms_users where user_id = (select auth.uid()) - and topic = (select realtime.topic()) + and room_topic = (select realtime.topic()) and realtime.messages.extension in ('presence') ) ); @@ -316,7 +316,7 @@ with check ( rooms_users where user_id = (select auth.uid()) - and name = (select realtime.topic()) + and room_topic = (select realtime.topic()) and realtime.messages.extension in ('presence') ) ); @@ -343,7 +343,7 @@ using ( rooms_users where user_id = (select auth.uid()) - and topic = (select realtime.topic()) + and room_topic = (select realtime.topic()) and realtime.messages.extension in ('broadcast', 'presence') ) ); @@ -366,7 +366,7 @@ with check ( rooms_users where user_id = (select auth.uid()) - and name = (select realtime.topic()) + and room_topic = (select realtime.topic()) and realtime.messages.extension in ('broadcast', 'presence') ) );