3 ms·
I've never done it, but I think it's possible to do this in Postgres as well using LISTEN and NOTIFY. You may want to do all of your database mutations through
by tiglionabbit 10y ago
I've never done it, but I think it's possible to do this in Postgres as well using LISTEN and NOTIFY. You may want to do all of your database mutations through functions that ultimately call NOTIFY for this to work though. But uh, that's how you'd do it in postgraphql or postgrest anyway.
https://github.com/calebmer/postgraphql https://github.com/calebmer/postgraphql
http://postgrest.com/ http://postgrest.com/
- bjt 10y agoYou can definitely use LISTEN and NOTIFY to watch for changes in Postgres. Here's a presentation I did on that last year, though oriented more towards web apps than analytics. https://www.youtube.com/watch?v=PsorlkAF83s https://www.youtube.com/watch?v=PsorlkAF83s For analytics I would want stronger guarantees than LISTEN and NOTIFY alone can provide. I explore options for that here: http://btubbs.com/streaming-updates-from-postgres.html http://btubbs.com/streaming-updates-from-postgres.html