|
|
|
@ -10,12 +10,12 @@ UNLISTEN |
|
|
|
|
UNLISTEN |
|
|
|
|
</REFNAME> |
|
|
|
|
<REFPURPOSE> |
|
|
|
|
Stop listening for notification on a notify condition |
|
|
|
|
Stop listening for notification |
|
|
|
|
</REFPURPOSE> |
|
|
|
|
|
|
|
|
|
<REFSYNOPSISDIV> |
|
|
|
|
<REFSYNOPSISDIVINFO> |
|
|
|
|
<DATE>1998-10-07</DATE> |
|
|
|
|
<DATE>1998-10-19</DATE> |
|
|
|
|
</REFSYNOPSISDIVINFO> |
|
|
|
|
<SYNOPSIS> |
|
|
|
|
UNLISTEN { <REPLACEABLE CLASS="PARAMETER">notifyname</REPLACEABLE> | * } |
|
|
|
@ -23,7 +23,7 @@ UNLISTEN { <REPLACEABLE CLASS="PARAMETER">notifyname</REPLACEABLE> | * } |
|
|
|
|
|
|
|
|
|
<REFSECT2 ID="R2-SQL-UNLISTEN-1"> |
|
|
|
|
<REFSECT2INFO> |
|
|
|
|
<DATE>1998-10-07</DATE> |
|
|
|
|
<DATE>1998-10-19</DATE> |
|
|
|
|
</REFSECT2INFO> |
|
|
|
|
<TITLE> |
|
|
|
|
Inputs |
|
|
|
@ -37,7 +37,7 @@ Inputs |
|
|
|
|
</TERM> |
|
|
|
|
<LISTITEM> |
|
|
|
|
<PARA> |
|
|
|
|
Name of notify condition to stop listening to. |
|
|
|
|
Name of previously registered notify condition. |
|
|
|
|
|
|
|
|
|
<VARLISTENTRY> |
|
|
|
|
<TERM> |
|
|
|
@ -53,7 +53,7 @@ All current listen registrations for this backend are cleared. |
|
|
|
|
|
|
|
|
|
<REFSECT2 ID="R2-SQL-UNLISTEN-2"> |
|
|
|
|
<REFSECT2INFO> |
|
|
|
|
<DATE>1998-10-07</DATE> |
|
|
|
|
<DATE>1998-10-19</DATE> |
|
|
|
|
</REFSECT2INFO> |
|
|
|
|
<TITLE> |
|
|
|
|
Outputs |
|
|
|
@ -87,49 +87,75 @@ Acknowledgement that statement has executed. |
|
|
|
|
|
|
|
|
|
<REFSECT1 ID="R1-SQL-UNLISTEN-1"> |
|
|
|
|
<REFSECT1INFO> |
|
|
|
|
<DATE>1998-10-07</DATE> |
|
|
|
|
<DATE>1998-10-19</DATE> |
|
|
|
|
</REFSECT1INFO> |
|
|
|
|
<TITLE> |
|
|
|
|
Description |
|
|
|
|
</TITLE> |
|
|
|
|
<PARA> |
|
|
|
|
<command>UNLISTEN</command> |
|
|
|
|
is used to remove an existing <command>NOTIFY</command> registration. |
|
|
|
|
UNLISTEN cancels any existing registration of the current |
|
|
|
|
<productname>Postgres</productname> backend as a listener on the notify |
|
|
|
|
<productname>Postgres</productname> session as a listener on the notify |
|
|
|
|
condition <REPLACEABLE CLASS="PARAMETER">notifyname</REPLACEABLE>. |
|
|
|
|
The special condition name "*" means to cancel all listener registrations |
|
|
|
|
for the current backend. |
|
|
|
|
The special condition wildcard "*" cancels all listener registrations |
|
|
|
|
for the current session. |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The backend does not complain if you UNLISTEN something you were not |
|
|
|
|
listening for. |
|
|
|
|
<xref linkend="sql-notify-ref" endterm="sql-notify-ref"> |
|
|
|
|
contains a more extensive |
|
|
|
|
discussion of the use of <command>LISTEN</command> and |
|
|
|
|
<command>NOTIFY</command>. |
|
|
|
|
|
|
|
|
|
<REFSECT2 ID="R2-SQL-UNLISTEN-3"> |
|
|
|
|
<REFSECT2INFO> |
|
|
|
|
<DATE>1998-10-19</DATE> |
|
|
|
|
</REFSECT2INFO> |
|
|
|
|
<TITLE> |
|
|
|
|
Notes |
|
|
|
|
</TITLE> |
|
|
|
|
<para> |
|
|
|
|
<REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE> |
|
|
|
|
needs not to be a valid class name but can be any string valid |
|
|
|
|
as a name up to 32 characters long. |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The backend does not complain if you UNLISTEN something you were not |
|
|
|
|
listening for. |
|
|
|
|
Each backend will automatically execute <command>UNLISTEN *</command> when |
|
|
|
|
exiting. |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The reference page for <command>NOTIFY</command> contains a more extensive |
|
|
|
|
discussion of the use of <command>LISTEN</command> and |
|
|
|
|
<command>NOTIFY</command>. |
|
|
|
|
A restriction in some previous releases of |
|
|
|
|
<productname>Postgres</productname> that a |
|
|
|
|
<REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE> |
|
|
|
|
which does not correspond to an actual table must be enclosed in double-quotes |
|
|
|
|
is no longer present. |
|
|
|
|
|
|
|
|
|
</REFSECT2> |
|
|
|
|
|
|
|
|
|
<REFSECT1 ID="R1-SQL-UNLISTEN-2"> |
|
|
|
|
<TITLE> |
|
|
|
|
Usage |
|
|
|
|
</TITLE> |
|
|
|
|
<PARA> |
|
|
|
|
<ProgramListing> |
|
|
|
|
postgres=> listen virtual; |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
<programlisting> |
|
|
|
|
postgres=> LISTEN virtual; |
|
|
|
|
LISTEN |
|
|
|
|
postgres=> notify virtual; |
|
|
|
|
postgres=> NOTIFY virtual; |
|
|
|
|
NOTIFY |
|
|
|
|
ASYNC NOTIFY of 'virtual' from backend pid '12317' received |
|
|
|
|
postgres=> unlisten virtual; |
|
|
|
|
</programlisting> |
|
|
|
|
|
|
|
|
|
<programlisting> |
|
|
|
|
postgres=> UNLISTEN virtual; |
|
|
|
|
UNLISTEN |
|
|
|
|
postgres=> notify virtual; |
|
|
|
|
postgres=> NOTIFY virtual; |
|
|
|
|
NOTIFY |
|
|
|
|
-- notice no NOTIFY event is received |
|
|
|
|
postgres=> |
|
|
|
|
</ProgramListing> |
|
|
|
|
</programlisting> |
|
|
|
|
|
|
|
|
|
</REFSECT1> |
|
|
|
|
|
|
|
|
@ -141,11 +167,12 @@ Compatibility |
|
|
|
|
|
|
|
|
|
<REFSECT2 ID="R2-SQL-UNLISTEN-4"> |
|
|
|
|
<REFSECT2INFO> |
|
|
|
|
<DATE>1998-10-07</DATE> |
|
|
|
|
<DATE>1998-10-19</DATE> |
|
|
|
|
</REFSECT2INFO> |
|
|
|
|
<TITLE> |
|
|
|
|
SQL92 |
|
|
|
|
</TITLE> |
|
|
|
|
<PARA> |
|
|
|
|
There is no <command>UNLISTEN</command> in <acronym>SQL92</acronym>. |
|
|
|
|
|
|
|
|
|
</REFENTRY> |
|
|
|
|