A contrib module which generates NOTIFY events on table changes

tcn ("triggered change notification") is a contrib module implemented as an extension which generates NOTIFY events on table changes via a trigger function.

tcn was added in PostgreSQL 9.2 (commit 6e3323d4).

Use cases

tcn is useful for applications using drivers which support asynchronous notification: this makes it possible to notify all clients if the contents of a table have been changed, enabling them to take appropriate action in near-real time, such as updating a table cache or information display.


tcn provides a single function, triggered_change_notification(), to be added as a row-level trigger.

Change history

With the exception of bugfixes and minor code changes, tcn has remained unchanged since it was added in PostgreSQL 9.2.

  • PostgreSQL documentation: tcn


Contrib module