Postgres / psql Hooks with Ecto...?

I would like to be able to build an external service that monitors my database and responds to postgres hooks.

I don’t really know anything about database hooks but it looks like the right solution for what I need.

Essentially, we have a postgres db which we need do report some aspects to an outside db (Salesforce). When our db updates, somethings need to be updated in Salesforce. I want to base this on database hooks so I don’t have to tightly couple the logic to my main application. As is, the integration is getting problematic and seems like it’s going to be a maintenance headache.

Any pointers?

I probably described this badly… I’m looking for something along the lines of Postgres Notify which leads me to PhoenixPostgresPubSub. I suspect this will work or lead me to the right answer anyway.

1 Like

have a look at https://github.com/bitgamma/boltun which gives a nice api for listen/notify…

1 Like