473,288 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

Listen and notify in psql process

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

Do Postgres has 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 how to do this.
Jun 16 '21 #1
0 3481

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alessandro GARDICH | last post by:
Hi to all I have problem with NOTIFY/LISTEN ... I'm writing a C++ application with libpqxx, I thought was a problem of the lib but I try also with a C program using libpq with the same result,...
3
by: CSN | last post by:
Every now and then my connection to my remote server will disconnect. If I was using the psql commandline, "ps" will show it's still running (after I log back on). Is there a way to get access to...
3
by: Tulga Kalayci | last post by:
Hi All, I need advise on how to proceed in a area which I have no experience. The problem is related to a call center solution. When a call comes, call center software + server handles call and...
4
by: Joe Lester | last post by:
I'm using PostgreSQL 7.4.1. I have 140 clients connected on average using libpq. When one client sends "NOTIFY timeclock;" to the server all 140 clients are listening for it. After receiving a...
4
by: Glenn Sullivan | last post by:
Hi, I have been trying to get LISTEN/NOTIFY working in with JDBC. I cannot seem to get notified. I looked in the e-mail archive and saw a lot of similiar questions a couple of years ago. I...
3
by: Frank van Vugt | last post by:
L.S. Either the docs or I are missing something.... While using libpq I noticed that listen/notify calls were being converted to lowercase. A further look showed that the listen/notify calls...
2
by: Russ Brown | last post by:
Hello, Today I tried connecting to my database locally via psql. I got the usual welcome & basic help messages, but it never got to the prompt: it just hung. So I checked top and the psql...
5
by: Ted Shab | last post by:
Hi, I'm trying to come up with a relatively simple multi-master replication solution. This is for multiple databases that need to be discreet, and change relatively infrequently (10-30 updates...
2
by: bahoo | last post by:
Hi, I'd like to write a script that sends me an email when a unix (Linux) process ends running (or CPU drops below some threshold). Could anyone point me to the relevant functions, or show me...
4
by: Christian Welzel | last post by:
Hi there, can somebody tell me if there is a mechanism in db2 which implements a notify/listen for external db clients? Postgres has such a mechanism where a client programm can connect to the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.