[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: LISTEN.7
File is not writable. Editing disabled.
'\" t .\" Title: LISTEN .\" Author: The PostgreSQL Global Development Group .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> .\" Date: 2017-11-06 .\" Manual: PostgreSQL 9.2.24 Documentation .\" Source: PostgreSQL 9.2.24 .\" Language: English .\" .TH "LISTEN" "7" "2017-11-06" "PostgreSQL 9.2.24" "PostgreSQL 9.2.24 Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" LISTEN \- listen for a notification .\" LISTEN .SH "SYNOPSIS" .sp .nf LISTEN \fIchannel\fR .fi .SH "DESCRIPTION" .PP \fBLISTEN\fR registers the current session as a listener on the notification channel named \fIchannel\fR\&. If the current session is already registered as a listener for this notification channel, nothing is done\&. .PP Whenever the command \fBNOTIFY \fR\fB\fIchannel\fR\fR is invoked, either by this session or another one connected to the same database, all the sessions currently listening on that notification channel are notified, and each will in turn notify its connected client application\&. .PP A session can be unregistered for a given notification channel with the \fBUNLISTEN\fR command\&. A session\*(Aqs listen registrations are automatically cleared when the session ends\&. .PP The method a client application must use to detect notification events depends on which PostgreSQL application programming interface it uses\&. With the libpq library, the application issues \fBLISTEN\fR as an ordinary SQL command, and then must periodically call the function \fBPQnotifies\fR 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 application programmer should not even issue \fBLISTEN\fR or \fBUNLISTEN\fR directly\&. See the documentation for the interface you are using for more details\&. .PP \fBNOTIFY\fR(7) contains a more extensive discussion of the use of \fBLISTEN\fR and \fBNOTIFY\fR\&. .SH "PARAMETERS" .PP \fIchannel\fR .RS 4 Name of a notification channel (any identifier)\&. .RE .SH "NOTES" .PP \fBLISTEN\fR takes effect at transaction commit\&. If \fBLISTEN\fR or \fBUNLISTEN\fR is executed within a transaction that later rolls back, the set of notification channels being listened to is unchanged\&. .PP A transaction that has executed \fBLISTEN\fR cannot be prepared for two\-phase commit\&. .SH "EXAMPLES" .PP Configure and execute a listen/notify sequence from psql: .sp .if n \{\ .RS 4 .\} .nf LISTEN virtual; NOTIFY virtual; Asynchronous notification "virtual" received from server process with PID 8448\&. .fi .if n \{\ .RE .\} .SH "COMPATIBILITY" .PP There is no \fBLISTEN\fR statement in the SQL standard\&. .SH "SEE ALSO" \fBNOTIFY\fR(7), \fBUNLISTEN\fR(7)
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.05 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A