Subscribing to Database Changes
Supabase allows you to subscribe to real-time changes on your database from your client application.
You can listen to database changes using the Postgres Changes extension. The following video shows how you can enable this feature for your tables.
Demo
Setup
You'll first need to create a supabase_realtime
publication and add your tables (that you want to subscribe to) to the publication:
Streaming inserts
You can use the INSERT
event to stream all new rows.
Streaming updates
You can use the UPDATE
event to stream all updated rows.
More resources
- Learn more about the Postgres Changes extension.
- Client Libraries: