Asynchronous publish/subscribe messaging built into the database — no external message broker needed.
PostgreSQL publish/subscribe mechanism for asynchronous notifications between database sessions: LISTEN registers interest in a channel, NOTIFY sends a notification to all subscribers. Useful for cache invalidation, background job triggering, and event-driven architectures without polling.
| Database System | Support Status | Since Version | Notes |
|---|---|---|---|
| MySQL | ✗ Not Supported | — | Not supported. Use application-layer messaging (Redis pub/sub, etc.). |
| PostgreSQL | ✓ Supported | all | LISTEN channel registers interest. NOTIFY channel [, payload] fires on transaction commit. Clients receive notifications via the connection. pg_notify(channel, payload) can be called from triggers or functions. Payload limited to ~8000 bytes. Works within a single database only. |
| SQL Server | ✗ Not Supported | — | Not supported as SQL. Service Broker provides similar functionality but with a very different architecture and syntax. |
| Oracle | ✗ Not Supported | — | Not supported as SQL. DBMS_ALERT and DBMS_PIPE PL/SQL packages provide async signaling but are PL/SQL-only. |
| SQLite | ✗ Not Supported | — | Not supported. SQLite is a single-process embedded database with no server process to hold pub/sub channels. |
Unique to PostgreSQL. Commonly used for cache invalidation, real-time job queue signaling, and live-update feeds — without any external infrastructure. Fires on COMMIT, not on the NOTIFY call itself.
Not supported. Use application-layer messaging (Redis pub/sub, etc.).
LISTEN channel registers interest. NOTIFY channel [, payload] fires on transaction commit. Clients receive notifications via the connection. pg_notify(channel, payload) can be called from triggers or functions. Payload limited to ~8000 bytes. Works within a single database only.
Not supported as SQL. Service Broker provides similar functionality but with a very different architecture and syntax.
Not supported as SQL. DBMS_ALERT and DBMS_PIPE PL/SQL packages provide async signaling but are PL/SQL-only.
Not supported. SQLite is a single-process embedded database with no server process to hold pub/sub channels.