{
    "content": [
        {
            "type": "text",
            "text": "# UNLISTEN(7) (man)\n\n**Summary:** UNLISTEN - stop listening for a notification\n\n**Synopsis:** UNLISTEN { channel | * }\n\n## Examples\n\n- `To make a registration:`\n- `LISTEN virtual;`\n- `NOTIFY virtual;`\n- `Asynchronous notification \"virtual\" received from server process with PID 8448.`\n- `Once UNLISTEN has been executed, further NOTIFY messages will be ignored:`\n- `UNLISTEN virtual;`\n- `NOTIFY virtual;`\n- `-- no NOTIFY event is received`\n\n## See Also\n\n- LISTEN(7)\n- NOTIFY(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (7 lines)\n- **PARAMETERS** (6 lines)\n- **NOTES** (6 lines)\n- **EXAMPLES** (12 lines)\n- **COMPATIBILITY** (2 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nUNLISTEN - stop listening for a notification\n\n### SYNOPSIS\n\nUNLISTEN { channel | * }\n\n### DESCRIPTION\n\nUNLISTEN is used to remove an existing registration for NOTIFY events.  UNLISTEN cancels any\nexisting registration of the current PostgreSQL session as a listener on the notification\nchannel named channel. The special wildcard * cancels all listener registrations for the\ncurrent session.\n\nNOTIFY(7) contains a more extensive discussion of the use of LISTEN and NOTIFY.\n\n### PARAMETERS\n\nchannel\nName of a notification channel (any identifier).\n\n*\nAll current listen registrations for this session are cleared.\n\n### NOTES\n\nYou can unlisten something you were not listening for; no warning or error will appear.\n\nAt the end of each session, UNLISTEN * is automatically executed.\n\nA transaction that has executed UNLISTEN cannot be prepared for two-phase commit.\n\n### EXAMPLES\n\nTo make a registration:\n\nLISTEN virtual;\nNOTIFY virtual;\nAsynchronous notification \"virtual\" received from server process with PID 8448.\n\nOnce UNLISTEN has been executed, further NOTIFY messages will be ignored:\n\nUNLISTEN virtual;\nNOTIFY virtual;\n-- no NOTIFY event is received\n\n### COMPATIBILITY\n\nThere is no UNLISTEN command in the SQL standard.\n\n### SEE ALSO\n\nLISTEN(7), NOTIFY(7)\n\n\n\nPostgreSQL 14.23                                2026                                     UNLISTEN(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "UNLISTEN",
        "section": "7",
        "mode": "man",
        "summary": "UNLISTEN - stop listening for a notification",
        "synopsis": "UNLISTEN { channel | * }",
        "flags": [],
        "examples": [
            "To make a registration:",
            "LISTEN virtual;",
            "NOTIFY virtual;",
            "Asynchronous notification \"virtual\" received from server process with PID 8448.",
            "Once UNLISTEN has been executed, further NOTIFY messages will be ignored:",
            "UNLISTEN virtual;",
            "NOTIFY virtual;",
            "-- no NOTIFY event is received"
        ],
        "see_also": [
            {
                "name": "LISTEN",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/LISTEN/7/json"
            },
            {
                "name": "NOTIFY",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/NOTIFY/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}