Description
Using pg_notify in Postgres alongside the NOTIFY and LISTEN syntax is all that's needed to build a real time updating dashboard.
Summary
- We’re going to take a look how I used a Postgres feature, pg_notify, to power a work schedule for a manufacturing company.
- Instead, we’ll use a production_item_wip (work-in-progress) table where each row will contain a timestamp as the item progresses through the stages of production.
- Here is a trigger procedure that sends a notification to the order_progress_event channel.
- pg_notify lends itself well to being used within a trigger when used to deliver real-time data streaming.