How to listen from within a psql process and get the payloads?
Do Postgresql 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.
I am looking for listen to return some thing when a notify has been issued.