Postgresql 中文操作指南
dblink_get_notify
dblink_get_notify — 检索连接上的异步通知
dblink_get_notify — retrieve async notifications on a connection
Synopsis
dblink_get_notify() returns setof (notify_name text, be_pid int, extra text)
dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, extra text)
Description
Return Value
返回 setof (notify_name text, be_pid int, extra text) ,如果没有则返回一个空集。
Returns setof (notify_name text, be_pid int, extra text), or an empty set if none.
Examples
SELECT dblink_exec('LISTEN virtual');
dblink_exec
-------------
LISTEN
(1 row)
SELECT * FROM dblink_get_notify();
notify_name | be_pid | extra
-------------+--------+-------
(0 rows)
NOTIFY virtual;
NOTIFY
SELECT * FROM dblink_get_notify();
notify_name | be_pid | extra
-------------+--------+-------
virtual | 1229 |
(1 row)