1UNLISTEN(7)                      SQL Commands                      UNLISTEN(7)
2
3
4

NAME

6       UNLISTEN - stop listening for a notification
7
8

SYNOPSIS

10       UNLISTEN { name | * }
11
12

DESCRIPTION

14       UNLISTEN  is used to remove an existing registration for NOTIFY events.
15       UNLISTEN cancels any existing registration of  the  current  PostgreSQL
16       session  as a listener on the notification name. The special wildcard *
17       cancels all listener registrations for the current session.
18
19       NOTIFY [notify(7)] contains a more extensive discussion of the  use  of
20       LISTEN and NOTIFY.
21

PARAMETERS

23       name   Name of a notification (any identifier).
24
25       *      All current listen registrations for this session are cleared.
26

NOTES

28       You  can  unlisten  something you were not listening for; no warning or
29       error will appear.
30
31       At the end of each session, UNLISTEN * is automatically executed.
32

EXAMPLES

34       To make a registration:
35
36       LISTEN virtual;
37       NOTIFY virtual;
38       Asynchronous notification "virtual" received from server process with PID 8448.
39
40
41       Once UNLISTEN has  been  executed,  further  NOTIFY  commands  will  be
42       ignored:
43
44       UNLISTEN virtual;
45       NOTIFY virtual;
46       -- no NOTIFY event is received
47
48

COMPATIBILITY

50       There is no UNLISTEN command in the SQL standard.
51

SEE ALSO

53       LISTEN [listen(7)], NOTIFY [notify(7)]
54
55
56
57SQL - Language Statements         2014-02-17                       UNLISTEN(7)
Impressum