]> begriffs open source - ai-pg/blob - full-docs/txt/contrib-dblink-get-notify.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / contrib-dblink-get-notify.txt
1
2 dblink_get_notify
3
4    dblink_get_notify — retrieve async notifications on a connection
5
6 Synopsis
7
8 dblink_get_notify() returns setof (notify_name text, be_pid int, extra text)
9 dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, ex
10 tra text)
11
12 Description
13
14    dblink_get_notify retrieves notifications on either the unnamed
15    connection, or on a named connection if specified. To receive
16    notifications via dblink, LISTEN must first be issued, using
17    dblink_exec. For details see LISTEN and NOTIFY.
18
19 Arguments
20
21    connname
22           The name of a named connection to get notifications on.
23
24 Return Value
25
26    Returns setof (notify_name text, be_pid int, extra text), or an empty
27    set if none.
28
29 Examples
30
31 SELECT dblink_exec('LISTEN virtual');
32  dblink_exec
33 -------------
34  LISTEN
35 (1 row)
36
37 SELECT * FROM dblink_get_notify();
38  notify_name | be_pid | extra
39 -------------+--------+-------
40 (0 rows)
41
42 NOTIFY virtual;
43 NOTIFY
44
45 SELECT * FROM dblink_get_notify();
46  notify_name | be_pid | extra
47 -------------+--------+-------
48  virtual     |   1229 |
49 (1 row)