It seems the JDBC driver no longer requires a query to be issued before
it will notice new notify messages and be able to process them via
getNotifications() . The JDBC driver documentation doesn't reflect this.
I've attached a patch that updates the documentation. It includes one
thing I'm not 100% sure of, though:
- It states that the need for a dummy query was removed in the 8.1
driver, but I'm not sure that it was in fact 8.1 (and have no idea what
the build number was). Before I went CVS-history-diving I thought I'd
ask and see if anybody knew when the change was.
In addition to correcting the confusion, I've added @see links to the Pg
LISTEN/NOTIFY docs, added a note about older versions requiring a dummy
select, noted that calling getNotifications() doesn't create network
traffic, and fixed an unrelated place where "8.1" should've read "8.1 or
later".
--
Craig Ringer
Argh!
It's very dependent on the underlying socket, and in particular doesn't
seem to work for Java's SSL sockets.
Sigh. I can have security OR low-overhead timely notifications.
--
Craig Ringer
--
Sent via pgsql-jdbc mailing list (pgsql...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc