Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’3y agoβ€’
2 replies
amanvir

Realtime filter on DELETE event not working

I've been trying to get realtime filters to work for an app I'm developing. I have noticed that the filter works as expected when listening for UPDATE events, but not for DELETE events. I have verified that I have all the Replication settings enabled, and have run the
alter table "test" replica identity full;
alter table "test" replica identity full;
command.

When I run the code below, the function that currently logs the payload executes any time any row is deleted from the table, even though I have a filter for rows where
id == rowId
id == rowId
.

Is this the expected behavior, or am I doing something wrong?

supabase
    .channel(`channel-delete`)
    .on(
        'postgres_changes',
        {
            event: 'DELETE',
            schema: 'public',
            table: 'test',
            filter: `id=eq.${rowId}`
        },
        (payload) => {
            console.log(payload);
        }
    )
    .subscribe();
supabase
    .channel(`channel-delete`)
    .on(
        'postgres_changes',
        {
            event: 'DELETE',
            schema: 'public',
            table: 'test',
            filter: `id=eq.${rowId}`
        },
        (payload) => {
            console.log(payload);
        }
    )
    .subscribe();
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Realtime not working
SupabaseSSupabase / help-and-questions
4mo ago
Realtime not working
SupabaseSSupabase / help-and-questions
4y ago
Supabase Realtime filter
SupabaseSSupabase / help-and-questions
4y ago
Realtime subscriptions not working
SupabaseSSupabase / help-and-questions
8mo ago