PDA

View Full Version : Not receive notification issued by postgresql database



matteo.ceruti
16th March 2012, 17:50
I use postgresql under linux.
When I insert a record in a table a rule emit a NOTIFY.
On the application I connect this SIGNAL:

QSqlDatabase::database().driver()->subscribeToNotification(sName + _UPDATE_STRING);
QObject::connect((QObject*)QSqlDatabase::database( ).driver(), SIGNAL(notification(const QString&)), this, SLOT(Notification(const QString&)));

The problem is the all the instance running on the network intercept this signal but not the application itself that insert the record.
On windows non problem.
Suggestions?
Thanks
Teo

Lesiok
17th March 2012, 14:53
As I remember some bug in postgresql client code (not in Qt). All notifications will be delivered after closing connection.

modonnell
2nd August 2012, 14:31
Has anyone found a solution to this? I'm having the same problem.