Listen and notify in psql process

From: Sakshi Jain <sakshijain10388(at)gmail(dot)com>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Listen and notify in psql process
Date: 2021-06-17 11:01:41
Message-ID: CACjnedJREryjgkHBtpuDY+xo2MtVVrnt6KFyCvh4TAgxnNaKMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sakshi Jain 2021-06-17 11:04:27 Fwd: Listen and notify in psql process
Previous Message Holger Vornholt 2021-06-17 09:38:46 views on partitioned tables

Browse pgsql-sql by date

  From Date Subject
Next Message Sakshi Jain 2021-06-17 11:04:27 Fwd: Listen and notify in psql process
Previous Message Дмитрий Иванов 2021-06-16 01:50:31 Re: function INPUT as whole table