walrus icon indicating copy to clipboard operation
walrus copied to clipboard

Enable filters for delete events

Open w3b6x9 opened this issue 2 years ago • 10 comments

Feature request

Is your feature request related to a problem? Please describe.

I want to be able to filter delete events based on primary key(s) and when replica identity is set to full, filter based on all columns available in database table.

Describe the solution you'd like

For DELETE events:

  • when I want to filter by a column that is not available in old_columns, then the subscriber is ignored.
  • when replica identity is not full, only filters referencing the pk column(s) are respected.
  • when replica identity is full, filters referencing any column in the table are respected.

Additional context

  • See comment: https://github.com/supabase/realtime/issues/265#issuecomment-1223768129

w3b6x9 avatar Aug 23 '22 17:08 w3b6x9

I am really desperately waiting for this feature!

roobox avatar Nov 12 '23 17:11 roobox

Stumped upon that, need the same feature for my team!

Zeulni avatar Nov 12 '23 18:11 Zeulni

Thanks for opening this issue @w3b6x9.

This should be at least clearly documented, it created a major in production for my mobile app...

christophemenager avatar Jan 31 '24 11:01 christophemenager

Hello, are we getting any official fix on this matter soon?

andy-leezard avatar Feb 15 '24 23:02 andy-leezard

This should be at least clearly documented, it created a major in production for my mobile app...

@christophemenager great call, i'll let our Realtime team know and we'll add it to our docs.

w3b6x9 avatar Feb 16 '24 20:02 w3b6x9

The UPDATE event ignoring filter as well

gsw85 avatar Mar 06 '24 09:03 gsw85

The UPDATE event ignoring filter as well

Mine is working on UPDATE event

Stiffjobs avatar Apr 07 '24 14:04 Stiffjobs

Can we just filter by old record ID? So we know it, just implementing that filter would be helpful

georgii-ivanov avatar May 16 '24 16:05 georgii-ivanov

It basically means you can't listen to the deletion of any user records currently because you'd subscribe to all deletion events on this table across the entire user base, right?

I hope there's a fix or a recommended workaround added to the documentation given it's a major challenge everyone using realtime capabilities may face.

alexeigs avatar Jun 11 '24 10:06 alexeigs

I really think that the limitations to realtime... such as this... such as the limitations on filtering multiple columns... such as the scaling issues related to listening to postgres_changes... should preclude supabase from being marketed as a realtime db...

These limitations really make using subscriptions to db changes useless for most real world applications.

I understand you can have a server that consumes postgres_changes and then emits with broadcast... but ideally these features would exist baked into the framework without having to host an additional server layer.

cphoover avatar Jun 28 '24 20:06 cphoover