SupabasefilipeAnnouncement
Postgres Changes gets AND filters, new operators, and column selection
Summary
Postgres Changes now supports filters composed across multiple columns, additional operators, and column selection for subscriptions over Postgres tables. It can receive insert, update, and delete events over WebSockets, while comma-separated conditions or the postgresChangesFilter builder combine conditions with AND. New operators include like, ilike, is, match, imatch, isdistinct, and negated forms, while selected payloads always include the table's primary key. Column selection is opt-in, requires @supabase/supabase-js 2.109.0 or newer, and columns must be selectable by the subscribing role; Row Level Security still applies. These changes can lower billable usage because rejected events avoid messages per subscriber and trimmed payloads send fewer egress bytes, although DELETE events carry only the primary key and OR composition is unsupported.
Context
A support inbox may need a live view restricted to tickets that are both open and assigned to a particular team. Previously, a filter could inspect only one column, requiring the application to receive broader results and discard tickets for other teams. Subscriptions also returned complete rows even when an interface used only a few fields.
Approach / What changed
Filters now compose with comma-separated conditions or the postgresChangesFilter builder, using AND semantics. Additional operators support patterns, null and boolean checks, regular expressions, NULL-safe inequality, and negation. An opt-in select option limits event payload columns while retaining the table primary key. Existing subscriptions remain unchanged unless filter or select is added.
Takeaways
Comma-separated filters and chained postgresChangesFilter conditions use AND composition; OR composition is not supported.
Column selection requires @supabase/supabase-js 2.109.0 or newer, and every listed column must be selectable by the subscribing role.
Rejected events save a message per subscriber, while selected payloads reduce egress bytes; DELETE events carry only the row's primary key, so column filters cannot be evaluated on deletes.
Source and freshness
- Source
- supabase.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.