]> begriffs open source - ai-pg/blob - full-docs/man3/dblink_get_notify.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / dblink_get_notify.3
1 '\" t
2 .\"     Title: dblink_get_notify
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "DBLINK_GET_NOTIFY" "3" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 dblink_get_notify \- retrieve async notifications on a connection
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 dblink_get_notify() returns setof (notify_name text, be_pid int, extra text)
36 dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, extra text)
37 .fi
38 .SH "DESCRIPTION"
39 .PP
40 \fBdblink_get_notify\fR
41 retrieves notifications on either the unnamed connection, or on a named connection if specified\&. To receive notifications via dblink,
42 \fBLISTEN\fR
43 must first be issued, using
44 \fBdblink_exec\fR\&. For details see
45 \fBLISTEN\fR(7)
46 and
47 \fBNOTIFY\fR(7)\&.
48 .SH "ARGUMENTS"
49 .PP
50 \fIconnname\fR
51 .RS 4
52 The name of a named connection to get notifications on\&.
53 .RE
54 .SH "RETURN VALUE"
55 .PP
56 Returns
57 setof (notify_name text, be_pid int, extra text), or an empty set if none\&.
58 .SH "EXAMPLES"
59 .sp
60 .if n \{\
61 .RS 4
62 .\}
63 .nf
64 SELECT dblink_exec(\*(AqLISTEN virtual\*(Aq);
65  dblink_exec
66 \-\-\-\-\-\-\-\-\-\-\-\-\-
67  LISTEN
68 (1 row)
69
70 SELECT * FROM dblink_get_notify();
71  notify_name | be_pid | extra
72 \-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-
73 (0 rows)
74
75 NOTIFY virtual;
76 NOTIFY
77
78 SELECT * FROM dblink_get_notify();
79  notify_name | be_pid | extra
80 \-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-
81  virtual     |   1229 |
82 (1 row)
83 .fi
84 .if n \{\
85 .RE
86 .\}