Listen and notify in psql process

Sakshi Jain <sakshijain10388@gmail.com>

From: Sakshi Jain <sakshijain10388@gmail.com>
To: pgsql-sql@lists.postgresql.org
Date: 2021-06-17T11:01:41Z
Lists: pgsql-general, pgsql-sql
Hi Team,

How to listen from within a psql process and get the payloads?

Do Postgres have any such a mechanism where in a session a process send a
"listen <name>" sql command and then gets a message if someone in the other
session issued a "notify <name>".

Please provide an example of how to do this.

-- 
*Thanks & Regards*
Sakshi Jain
New Delhi
8882433263