eugene-khyst/postgresql-event-sourcing

Postgres does not support subscribing on changes?

Closed this issue · 2 comments

How about:

https://www.postgresql.org/docs/current/sql-notify.html

?

When NOTIFY is used to signal the occurrence of changes to a particular table, a useful programming technique is to put the NOTIFY in a statement trigger that is triggered by table updates. In this way, notification happens automatically when the table is changed, and the application programmer cannot accidentally forget to do it.

This issue is related to #2.
If PostgreSQL LISTEN/NOTIFY is applicable, then #2 will be automatically fixed.
Will investigate this.

PostgreSQL Listen/Notify functionality can be used as an alternative to the database polling.
See the corresponding README section for more details - https://github.com/evgeniy-khist/postgresql-event-sourcing#4-7-3