From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dominique Devienne <ddevienne@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Catalog for LISTEN'ed to notification channels?
Date: Thu, 22 Jun 2023 09:29:59 -0400
Message-ID: <4047830.1687440599@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFCRh-9_C0PAAYTsO_acUV07u_U4jNOhz3vHwHrMvVPOTDwAGA@mail.gmail.com>
References: <CAFCRh-9_C0PAAYTsO_acUV07u_U4jNOhz3vHwHrMvVPOTDwAGA@mail.gmail.com>
Dominique Devienne <ddevienne@gmail.com> writes:
> Can I introspect which "channel(s)" the current (or any other session) is
> LISTEN'ing to?
The pg_listening_channels() function will show you channel names the
current session is listening to. There's no way to find out about
other sessions, because that state is only backend-local.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ddevienne@gmail.com
Subject: Re: Catalog for LISTEN'ed to notification channels?
In-Reply-To: <4047830.1687440599@sss.pgh.pa.us>
References: <CAFCRh-9_C0PAAYTsO_acUV07u_U4jNOhz3vHwHrMvVPOTDwAGA@mail.gmail.com> <4047830.1687440599@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox