Skip to content

Feature Request: Enable client-side filtering on Realtime subscriptions for RLS-enabled tables without dropping payload #1568

Description

@Raphassith

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

Currently, when Row Level Security (RLS) is enabled on a table, any attempt to use client-side filters in Realtime subscriptions (e.g., .on('postgres_changes', { filter: 'status=eq.1' })) fails because the database security context strips away the payload before the filter can evaluate it.

To bypass this and get filtered realtime updates, developers are forced to disable RLS and rely solely on GRANT/REVOKE permissions. However, this is not ideal for strict security practices.

Proposed Solution / Request:
Is there a way to optimize the Realtime engine (walrus) to securely evaluate simple client-side filters on RLS-enabled tables? This would immensely help developers achieve maximum security (keeping RLS enabled) while drastically saving network bandwidth by only streaming the exact matched payloads to the client.

Your Suggestion for Changes

No response

Documentation URL

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions