DEV Community

Cover image for How to use Realtime Functionality in Supabase Postgress Database
Next Dev
Next Dev

Posted on

How to use Realtime Functionality in Supabase Postgress Database

WELCOME πŸ‘‹ friends to this new blog post. In this blog post, you will learn how to fetch data or get alerted whenever a row is inserted, updated, and deleted in the supabase Postgres database with the help of a supabase subscription, 😁Pretty easy to setup.

πŸ€”When to use it?

Suppose, I gave you a project of making a real-time chat app with supabase. Then you need to fetch data whenever a new chat is inserted, deleted, or updated.

First, you need to go to the supabase database settings:

**Note: **I have selected my tables, the table settings would be different from yours.

πŸ‘€Note: The tables which are enabled by clicking the green button will be able to make real-time data fetching.


**on πŸ‘† **can have three 4 types:
  1. INSERT β€” Listening to the table if any new row is inserted

  2. UPDATEβ€” Listening to table if any row is updated

  3. DELETEβ€” Listening to table if any row is deleted

    • β€” Listening to the table for all the above changes.

you will get a response something like this:

For People who understand Hindi: https://youtu.be/ECIfs9bb7OA

Thanks for reading, if any error comes, feel free to ask here πŸ‘‡:
Join the Next Dev's server Discord Server!

Top comments (0)