Disconnected from server. Attempting to reconnect...

Order Feed

pg_reactive Example 2 — Multi-table JOIN

Changes to orders, customers, OR products all trigger updates

Recent Orders (0 rows)

ID Customer Region Product Qty Total Time
This query JOINs 3 tables. Changing a customer name, product name, or order detail all trigger a real-time delta. CDC tools like Debezium, Supabase, and ElectricSQL cannot track JOINs — they only watch single-table changes. pg_reactive re-evaluates the full query and delivers precise inserted/deleted row diffs over WebSocket.
Demo Commands

Run these in a psql session: docker compose exec -T db psql -U postgres -d pg_reactive_test

-- New order (row appears instantly)
INSERT INTO orders (customer_id, product_id, qty, total)
VALUES (1, 1, 2, 159.98);

-- Change customer name -- the JOIN updates!
UPDATE customers SET name = 'Alice Chen'
WHERE name = 'Alice Johnson';

-- Change product name -- order feed reflects it
UPDATE products SET name = 'Pro Keyboard'
WHERE name = 'Mechanical Keyboard';

-- Delete an order
DELETE FROM orders WHERE id = 1;