3 PostgreSQL documentation
6 <refentry id=
"SQL-UNLISTEN">
8 <refentrytitle id=
"SQL-UNLISTEN-TITLE">UNLISTEN
</refentrytitle>
9 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
13 <refname>UNLISTEN
</refname>
14 <refpurpose>stop listening for a notification
</refpurpose>
17 <indexterm zone=
"sql-unlisten">
18 <primary>UNLISTEN
</primary>
23 UNLISTEN {
<replaceable class=
"PARAMETER">name
</replaceable> | * }
28 <title>Description
</title>
31 <command>UNLISTEN
</command> is used to remove an existing
32 registration for
<command>NOTIFY
</command> events.
33 <command>UNLISTEN
</command> cancels any existing registration of
34 the current
<productname>PostgreSQL
</productname> session as a
35 listener on the notification
<replaceable
36 class=
"PARAMETER">name
</replaceable>. The special wildcard
37 <literal>*
</literal> cancels all listener registrations for the
42 <xref endterm=
"sql-notify-title" linkend=
"sql-notify">
43 contains a more extensive
44 discussion of the use of
<command>LISTEN
</command> and
45 <command>NOTIFY
</command>.
50 <title>Parameters
</title>
54 <term><replaceable class=
"PARAMETER">name
</replaceable></term>
57 Name of a notification (any identifier).
63 <term><literal>*
</literal></term>
66 All current listen registrations for this session are cleared.
77 You can unlisten something you were not listening for; no warning or error
82 At the end of each session,
<command>UNLISTEN *
</command> is
83 automatically executed.
88 <title>Examples
</title>
91 To make a registration:
96 Asynchronous notification
"virtual" received from server process with PID
8448.
101 Once
<command>UNLISTEN<
/> has been executed, further
<command>NOTIFY<
/>
102 commands will be ignored:
107 -- no NOTIFY event is received
113 <title>Compatibility
</title>
116 There is no
<command>UNLISTEN
</command> command in the SQL standard.
121 <title>See Also
</title>
123 <simplelist type=
"inline">
124 <member><xref linkend=
"sql-listen" endterm=
"sql-listen-title"></member>
125 <member><xref linkend=
"sql-notify" endterm=
"sql-notify-title"></member>