Top Previous Next

Fires when TPSQLNotify receives notification from PostgreSQL server.

Useful for PostreSQL v9.x and higher only, due to new LISTEN/NOTIFY functionality.


TPSQLNotifyEventEx = procedure (Sender: TObject;
    Channel: string;
    Payload: string;
    ProcessID : Integer) of object;
property OnNotify: TPSQLNotifyEventEx;


Write your own OnNotifyEx event handler to handle notifications from other client applications. For example, to refresh table or to notify client application user about some event in your system was happened.

Channel will contain name of the notification channel signaled (any identifier).

The Payload string communicated along with the notification. Specified as a simple string literal. In the default configuration it must be shorter than 8000 bytes.

If binary data or large amounts of information need to be communicated, it's best to put it in a database table and send the key of the record.

ProcessID will contain an ID of client application process, which sent this notification.