3 PostgreSQL documentation
6 <refentry id=
"SQL-UNLISTEN">
8 <refentrytitle id=
"SQL-UNLISTEN-TITLE">UNLISTEN
</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
14 <refname>UNLISTEN
</refname>
15 <refpurpose>stop listening for a notification
</refpurpose>
18 <indexterm zone=
"sql-unlisten">
19 <primary>UNLISTEN
</primary>
24 UNLISTEN {
<replaceable class=
"PARAMETER">name
</replaceable> | * }
29 <title>Description
</title>
32 <command>UNLISTEN
</command> is used to remove an existing
33 registration for
<command>NOTIFY
</command> events.
34 <command>UNLISTEN
</command> cancels any existing registration of
35 the current
<productname>PostgreSQL
</productname> session as a
36 listener on the notification
<replaceable
37 class=
"PARAMETER">name
</replaceable>. The special wildcard
38 <literal>*
</literal> cancels all listener registrations for the
43 <xref endterm=
"sql-notify-title" linkend=
"sql-notify">
44 contains a more extensive
45 discussion of the use of
<command>LISTEN
</command> and
46 <command>NOTIFY
</command>.
51 <title>Parameters
</title>
55 <term><replaceable class=
"PARAMETER">name
</replaceable></term>
58 Name of a notification (any identifier).
64 <term><literal>*
</literal></term>
67 All current listen registrations for this session are cleared.
78 You can unlisten something you were not listening for; no warning or error
83 At the end of each session,
<command>UNLISTEN *
</command> is
84 automatically executed.
89 <title>Examples
</title>
92 To make a registration:
97 Asynchronous notification
"virtual" received from server process with PID
8448.
102 Once
<command>UNLISTEN<
/> has been executed, further
<command>NOTIFY<
/>
103 commands will be ignored:
108 -- no NOTIFY event is received
114 <title>Compatibility
</title>
117 There is no
<command>UNLISTEN
</command> command in the SQL standard.
122 <title>See Also
</title>
124 <simplelist type=
"inline">
125 <member><xref linkend=
"sql-listen" endterm=
"sql-listen-title"></member>
126 <member><xref linkend=
"sql-notify" endterm=
"sql-notify-title"></member>