Automate with PostgreSQL Triggers & Supabase ๐ค
Learn how to use PostgreSQL triggers to automate processes with Supabase in this introductory video on PostgreSQL functions.

Supabase
40.0K views โข Dec 28, 2021

About this video
For the introductory video on PostgreSQL functions, check out ๐ https://www.youtube.com/watch?v=MJZCCpCYEqk
Functions in Postgres allow us to encapsulate some logic in our database, but we don't want to have to call these functions manually, whenever data in our database changes. In order to automate this, we can use Postgres Triggers.
Triggers in PostgreSQL allow us to subscribe to particular events that occur in the database - insert, update or delete - and call a Postgres function whenever they occur. This allows us to automate some of those manual processes - such as creating a row in our profiles table for each user who signs in.
In this video, Jon Meyers (https://twitter.com/jonmeyers_io) explains how we can model our database schema by creating a profiles table to hold additional data about our user. We can then create a trigger that listens for insert events on the auth.users table and automatically creates a profile for them.
This is part of a series of videos about functions in PostgreSQL, check out the rest of the playlist to learn more: https://www.youtube.com/playlist?list=PL5S4mPUpp4OtkMYxAxNpEuuDQuI2pWF3-
๐ฎโโ๏ธ Learn about Row Level Security: https://www.youtube.com/watch?v=Ow_Uzedfohk
๐ฐ Get really good at Supabase and build a SaaS product (free course): https://egghead.io/courses/build-a-saas-product-with-next-js-supabase-and-stripe-61f2bc20
---
Learn more about Supabase ๐
๐ธ Website: https://supabase.com/
๐ Get started: https://app.supabase.com/
๐ Docs: https://supabase.com/docs
๐ Github: https://github.com/supabase
๐ฌ Discord: https://discord.supabase.com/
๐ฆ Twitter: https://twitter.com/supabase/
Jon Meyers ๐
๐ธ Website: https://jonmeyers.io/
๐ฅ YouTube Channel: https://www.youtube.com/c/jonmeyers
๐ฆ Twitter: https://twitter.com/jonmeyers_io
---
Functions in Postgres allow us to encapsulate some logic in our database, but we don't want to have to call these functions manually, whenever data in our database changes. In order to automate this, we can use Postgres Triggers.
Triggers in PostgreSQL allow us to subscribe to particular events that occur in the database - insert, update or delete - and call a Postgres function whenever they occur. This allows us to automate some of those manual processes - such as creating a row in our profiles table for each user who signs in.
In this video, Jon Meyers (https://twitter.com/jonmeyers_io) explains how we can model our database schema by creating a profiles table to hold additional data about our user. We can then create a trigger that listens for insert events on the auth.users table and automatically creates a profile for them.
This is part of a series of videos about functions in PostgreSQL, check out the rest of the playlist to learn more: https://www.youtube.com/playlist?list=PL5S4mPUpp4OtkMYxAxNpEuuDQuI2pWF3-
๐ฎโโ๏ธ Learn about Row Level Security: https://www.youtube.com/watch?v=Ow_Uzedfohk
๐ฐ Get really good at Supabase and build a SaaS product (free course): https://egghead.io/courses/build-a-saas-product-with-next-js-supabase-and-stripe-61f2bc20
---
Learn more about Supabase ๐
๐ธ Website: https://supabase.com/
๐ Get started: https://app.supabase.com/
๐ Docs: https://supabase.com/docs
๐ Github: https://github.com/supabase
๐ฌ Discord: https://discord.supabase.com/
๐ฆ Twitter: https://twitter.com/supabase/
Jon Meyers ๐
๐ธ Website: https://jonmeyers.io/
๐ฅ YouTube Channel: https://www.youtube.com/c/jonmeyers
๐ฆ Twitter: https://twitter.com/jonmeyers_io
---
Video Information
Views
40.0K
Likes
1.1K
Duration
10:47
Published
Dec 28, 2021
User Reviews
4.7
(8) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
Trending Now