|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
SQL Commands LISTEN()
NAME
LISTEN - listen for a notification
SYNOPSIS
LISTEN name
DESCRIPTION
LISTEN registers the current session as a listener on the
notification condition name. If the current session is
already registered as a listener for this notification con-
dition, nothing is done.
Whenever the command NOTIFY name is invoked, either by this
session or another one connected to the same database, all
the sessions currently listening on that notification condi-
tion are notified, and each will in turn notify its con-
nected client application. See the discussion of NOTIFY for
more information.
A session can be unregistered for a given notify condition
with the UNLISTEN command. A session's listen registrations
are automatically cleared when the session ends.
The method a client application must use to detect notifica-
tion events depends on which PostgreSQL application program-
ming interface it uses. With the libpq library, the applica-
tion issues LISTEN as an ordinary SQL command, and then must
periodically call the function PQnotifies to find out
whether any notification events have been received. Other
interfaces such as libpgtcl provide higher-level methods for
handling notify events; indeed, with libpgtcl the applica-
tion programmer should not even issue LISTEN or UNLISTEN
directly. See the documentation for the interface you are
using for more details.
NOTIFY [notify(5)] contains a more extensive discussion of
the use of LISTEN and NOTIFY.
PARAMETERS
name Name of a notify condition (any identifier).
EXAMPLES
Configure and execute a listen/notify sequence from psql:
LISTEN virtual;
NOTIFY virtual;
Asynchronous notification "virtual" received from server process with PID 8448.
SQL - Language StatemLast change: 2005-11-05 1
SQL Commands LISTEN()
COMPATIBILITY
There is no LISTEN statement in the SQL standard.
SEE ALSO
NOTIFY [notify(5)], UNLISTEN [unlisten(l)]
SQL - Language StatemLast change: 2005-11-05 2
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Wed Sep 12 11:27:51 GMT 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
sqlite3 man page (4767 hits) (openSUSE 10.2)
adv_cap_autoneg man page (4617 hits) (Solaris 10 11_06)
CPAN man page (4352 hits) (Suse Linux 10.1)
ssh man page (4196 hits) (Suse Linux 10.1)
svn man page (3410 hits) (FreeBSD 6.2)
startproc man page (1957 hits) (Suse Linux 10.1)
pprosetup man page (1746 hits) (Solaris 10 11_06)
netcat man page (1697 hits) (Suse Linux 10.1)
signal man page (1686 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (1661 hits) (Solaris 10 11_06)
|