Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: realtime.send sets the proper value for realtime.topic #1255

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

filipecabaco
Copy link
Contributor

@filipecabaco filipecabaco commented Dec 24, 2024

What kind of change does this PR introduce?

realtime.send sets the proper value for realtime.topic so RLS policies are applied properly.

Copy link

vercel bot commented Dec 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
realtime-demo ⬜️ Ignored (Inspect) Visit Preview Dec 24, 2024 6:02pm

realtime.send sets the proper value for realtime.topic so RLS policies are applied properly.
@filipecabaco filipecabaco force-pushed the fix/set-topic-on-realtime-send branch from d6d2d5d to 0343476 Compare December 24, 2024 16:30
BEGIN
BEGIN
-- Set the topic configuration
SET SESSION realtime.topic TO topic;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we do not want to set this for the whole session, only for the transaction

set_config('realtime.topic', 'topic', true)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or SET LOCAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants