1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2003-04-27 01:56:51 +02:00
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/unlisten.sgml,v 1.21 2003/04/26 23:56:51 petere Exp $
|
2001-12-08 04:24:40 +01:00
|
|
|
PostgreSQL documentation
|
1999-07-22 17:09:15 +02:00
|
|
|
-->
|
|
|
|
|
1999-07-14 22:32:59 +02:00
|
|
|
<refentry id="SQL-UNLISTEN">
|
|
|
|
<refmeta>
|
2002-04-21 21:02:39 +02:00
|
|
|
<refentrytitle>UNLISTEN</refentrytitle>
|
1999-07-14 22:32:59 +02:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
2003-04-27 01:56:51 +02:00
|
|
|
|
1999-07-14 22:32:59 +02:00
|
|
|
<refnamediv>
|
2003-04-27 01:56:51 +02:00
|
|
|
<refname>UNLISTEN</refname>
|
|
|
|
<refpurpose>stop listening for a notification</refpurpose>
|
1999-07-14 22:32:59 +02:00
|
|
|
</refnamediv>
|
2003-04-27 01:56:51 +02:00
|
|
|
|
1999-07-14 22:32:59 +02:00
|
|
|
<refsynopsisdiv>
|
2003-04-27 01:56:51 +02:00
|
|
|
<synopsis>
|
|
|
|
UNLISTEN { <replaceable class="PARAMETER">name</replaceable> | * }
|
|
|
|
</synopsis>
|
1999-07-14 22:32:59 +02:00
|
|
|
</refsynopsisdiv>
|
|
|
|
|
2003-04-27 01:56:51 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
1999-07-14 22:32:59 +02:00
|
|
|
|
|
|
|
<para>
|
2003-04-27 01:56:51 +02:00
|
|
|
<command>UNLISTEN</command> is used to remove an existing
|
|
|
|
registration for <command>NOTIFY</command> events.
|
|
|
|
<command>UNLISTEN</command> cancels any existing registration of
|
|
|
|
the current <productname>PostgreSQL</productname> session as a
|
|
|
|
listener on the notification <replaceable
|
|
|
|
class="PARAMETER">name</replaceable>. The special wildcard
|
|
|
|
<literal>*</literal> cancels all listener registrations for the
|
|
|
|
current session.
|
1999-07-14 22:32:59 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-12-26 00:15:27 +01:00
|
|
|
<xref endterm="sql-notify-title" linkend="sql-notify">
|
1999-07-14 22:32:59 +02:00
|
|
|
contains a more extensive
|
|
|
|
discussion of the use of <command>LISTEN</command> and
|
|
|
|
<command>NOTIFY</command>.
|
|
|
|
</para>
|
2003-04-27 01:56:51 +02:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Parameters</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Name of a notification (any identifier).
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><literal>*</literal></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
All current listen registrations for this session are cleared.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Diagnostics</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><computeroutput>UNLISTEN</computeroutput></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Message returned when the command has executed.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Notes</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
You unlisten something you were not listening for; no warning or error will appear.
|
|
|
|
</para>
|
1999-07-14 22:32:59 +02:00
|
|
|
|
2003-04-27 01:56:51 +02:00
|
|
|
<para>
|
|
|
|
At the end of each session, <command>UNLISTEN *</command> ist
|
|
|
|
automatically executed.
|
|
|
|
</para>
|
1999-07-14 22:32:59 +02:00
|
|
|
</refsect1>
|
|
|
|
|
2003-04-27 01:56:51 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
1999-07-14 22:32:59 +02:00
|
|
|
|
|
|
|
<para>
|
2003-04-27 01:56:51 +02:00
|
|
|
To make a registration:
|
1999-07-14 22:32:59 +02:00
|
|
|
|
2000-03-26 20:32:30 +02:00
|
|
|
<programlisting>
|
2000-07-21 06:49:23 +02:00
|
|
|
LISTEN virtual;
|
|
|
|
NOTIFY virtual;
|
2000-03-26 20:32:30 +02:00
|
|
|
Asynchronous NOTIFY 'virtual' from backend with pid '8448' received
|
|
|
|
</programlisting>
|
1999-07-14 22:32:59 +02:00
|
|
|
</para>
|
1998-10-21 07:34:12 +02:00
|
|
|
|
1999-07-14 22:32:59 +02:00
|
|
|
<para>
|
2002-09-21 20:32:54 +02:00
|
|
|
Once <command>UNLISTEN</> has been executed, further <command>NOTIFY</> commands will be
|
1999-07-14 22:32:59 +02:00
|
|
|
ignored:
|
|
|
|
|
2000-03-26 20:32:30 +02:00
|
|
|
<programlisting>
|
2000-07-21 06:48:33 +02:00
|
|
|
UNLISTEN virtual;
|
|
|
|
NOTIFY virtual;
|
2003-04-27 01:56:51 +02:00
|
|
|
-- no NOTIFY event is received
|
2000-03-26 20:32:30 +02:00
|
|
|
</programlisting>
|
1999-07-14 22:32:59 +02:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2003-04-27 01:56:51 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
There is no <command>UNLISTEN</command> command in the SQL standard.
|
|
|
|
</para>
|
1999-07-14 22:32:59 +02:00
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:nil
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../reference.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:"/usr/lib/sgml/catalog"
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|