~ubuntu-branches/ubuntu/trusty/postgresql-9.3/trusty-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
'\" t
.\"     Title: UNLISTEN
.\"    Author: The PostgreSQL Global Development Group
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\"      Date: 2016
.\"    Manual: PostgreSQL 9.3.12 Documentation
.\"    Source: PostgreSQL 9.3.12
.\"  Language: English
.\"
.TH "UNLISTEN" "7" "2016" "PostgreSQL 9.3.12" "PostgreSQL 9.3.12 Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
UNLISTEN \- stop listening for a notification
.\" UNLISTEN
.SH "SYNOPSIS"
.sp
.nf
UNLISTEN { \fIchannel\fR | * }
.fi
.SH "DESCRIPTION"
.PP
\fBUNLISTEN\fR
is used to remove an existing registration for
\fBNOTIFY\fR
events\&.
\fBUNLISTEN\fR
cancels any existing registration of the current
PostgreSQL
session as a listener on the notification channel named
\fIchannel\fR\&. The special wildcard
*
cancels all listener registrations for the current session\&.
.PP
\fBNOTIFY\fR(7)
contains a more extensive discussion of the use of
\fBLISTEN\fR
and
\fBNOTIFY\fR\&.
.SH "PARAMETERS"
.PP
\fIchannel\fR
.RS 4
Name of a notification channel (any identifier)\&.
.RE
.PP
*
.RS 4
All current listen registrations for this session are cleared\&.
.RE
.SH "NOTES"
.PP
You can unlisten something you were not listening for; no warning or error will appear\&.
.PP
At the end of each session,
\fBUNLISTEN *\fR
is automatically executed\&.
.PP
A transaction that has executed
\fBUNLISTEN\fR
cannot be prepared for two\-phase commit\&.
.SH "EXAMPLES"
.PP
To make a registration:
.sp
.if n \{\
.RS 4
.\}
.nf
LISTEN virtual;
NOTIFY virtual;
Asynchronous notification "virtual" received from server process with PID 8448\&.
.fi
.if n \{\
.RE
.\}
.PP
Once
\fBUNLISTEN\fR
has been executed, further
\fBNOTIFY\fR
messages will be ignored:
.sp
.if n \{\
.RS 4
.\}
.nf
UNLISTEN virtual;
NOTIFY virtual;
\-\- no NOTIFY event is received
.fi
.if n \{\
.RE
.\}
.SH "COMPATIBILITY"
.PP
There is no
\fBUNLISTEN\fR
command in the SQL standard\&.
.SH "SEE ALSO"
\fBLISTEN\fR(7), \fBNOTIFY\fR(7)