feat: Adds new filters to increase Postgrest parity#81
Open
filipecabaco wants to merge 3 commits into
Open
Conversation
samrose
requested changes
Jun 1, 2026
3cbb2cb to
6f02022
Compare
6f02022 to
541fd57
Compare
Fixes the behaviour where empty array would be handled as a NULL meaning the user could be mislead into thinking that they were properly filtering data when they weren't.
The behaviour now is:
* `NULL` returns all columns
* `{}` errors out so we can inform the user
https://linear.app/supabase/issue/REAL-843/treat-empty-pg-changes-select-as-an-error
541fd57 to
5919d30
Compare
| alter type realtime.equality_op add value 'imatch'; | ||
| alter type realtime.equality_op add value 'isdistinct'; | ||
|
|
||
| alter type realtime.user_defined_filter add attribute negate boolean; |
There was a problem hiding this comment.
Wouldn't be this one a breaking change? After this a composite literal must supply all four fields, so any positional literal that supplies 3 fields now fails with 'Input has too few columns' .
The main concern is the write path: the Realtime server constructs these literals when a client subscribes, so the migration and the server change have to ship in lockstep — an old server against the new type will fail on every new subscription
| alter type realtime.equality_op add value 'match'; | ||
| alter type realtime.equality_op add value 'imatch'; | ||
| alter type realtime.equality_op add value 'isdistinct'; | ||
|
|
There was a problem hiding this comment.
We should be updating the README too after this change? https://github.com/supabase/walrus/blob/master/README.md?plain=1#L49
d09e318 to
9dc7145
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Adds like, ilike, is, match, imatch, and isdistinct filter operators to realtime subscriptions, along with a negate flag on user_defined_filter to support NOT variants (e.g. IS NOT, IS NOT DISTINCT FROM).
This increases our parity with Postgrest filters
https://linear.app/supabase/issue/REAL-832/improve-filter-parity-based-on-postgrest