Software: Apache/2.2.22 (Debian). PHP/5.6.36 uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) Safe-mode: OFF (not secure) /usr/share/doc/postgresql-doc-9.1/html/ drwxr-xr-x |
Viewing file: Select action/file-type:
31.7. Asynchronous NotificationPostgreSQL offers asynchronous notification via the LISTEN and NOTIFY commands. A client session registers its interest in a particular notification channel with the LISTEN command (and can stop listening with the UNLISTEN command). All sessions listening on a particular channel will be notified asynchronously when a NOTIFY command with that channel name is executed by any session. A "payload" string can be passed to communicate additional data to the listeners. libpq applications submit
LISTEN, UNLISTEN,
and NOTIFY commands as
ordinary SQL commands. The arrival of NOTIFY
messages can subsequently be detected by calling
The function PGnotify *PQnotifies(PGconn *conn); typedef struct pgNotify { char *relname; /* notification channel name */ int be_pid; /* process ID of notifying server process */ char *extra; /* notification payload string */ } PGnotify;
After processing a PGnotify object returned
by Example 31-2 gives a sample program that illustrates the use of asynchronous notification. A better way to check for NOTIFY messages when you have no
useful commands to execute is to call
|
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0372 ]-- |