Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Databases - Practical PostgreSQL
Previous Page Home Next Page

UNLISTEN

Name

UNLISTEN -- Stops the backend process from listening for a notification event.

Synopsis

UNLISTEN { 
notifyname
 | * }

Examples

notifyname

The name of the NOTIFY condition you wish to stop listening for.

*

Passing the asterisk symbol (*) as the name of the notify condition will stop the backend from listening for any currently defined conditions.

Results

UNLISTEN

The message returned when a UNLISTEN command is completed successfully.

Description

Use the UNLISTEN command to unregister a current NOTIFY registration matching the notify condition specified by notifyname . Alternatively, you can use the wildcard symbol (*) to remove all listener registrations for the current session. When a backend shuts down it will automatically issue UNLISTEN * to remove all listener registrations.

Note: If you are interested in seeing all of the notification events being listened for, you may query the relname column from the pg_listener system table.

More information about using the NOTIFY and LISTEN commands (which work together to form the simple interprocess communication or IPC system) can be found by referring to NOTIFY."

Example

The following example checks all notifications being listened for, and subsequently stops the backend process from listening for the publisher_update event:

booktown=# 
SELECT relname FROM pg_listener;

     relname
------------------
 publisher_update
 publisher_delete
(2 rows)

booktown=# 
UNLISTEN publisher_update;

UNLISTEN
booktown=# 
SELECT relname FROM pg_listener;

     relname
------------------
 publisher_delete
Databases - Practical PostgreSQL
Previous Page Home Next Page

 
 
  Published under the terms of the Open Publication License Design by Interspire