Обсуждение: PGConnection getNotifications
I'm a newbie to postgreSQL so please forgive my ignorance. I am able to write code that connects/updates a database. I copied a simple Notify/Listen example and for the life of me I can't seem to figure out why the getNotifications() method for the PGConnection class is undefined? All the examples use it and the docs say its available after version 7.3 or so. I've installed PostgreSQL 9.1.4, and link to postgresql-9.0-801.jdbc4.jar in my project. What piece am I missing?
On 08/17/2012 11:32 PM, k f wrote:
I'm a newbie to postgreSQL so please forgive my ignorance. I am able to write code that connects/updates a database. I copied a simple Notify/Listen example and for the life of me I can't seem to figure out why the getNotifications() method for the PGConnection class is undefined? All the examples use it and the docs say its available after version 7.3 or so. I've installed PostgreSQL 9.1.4, and link to postgresql-9.0-801.jdbc4.jar in my project. What piece am I missing?
Please show your code, preferably a self-contained class that you can post in its entirety.
At a guess, you're trying to use getNotifications() on the JDBC java.sql.Connection object, without unwrapping it to get the underlying PGConnection.
--
Craig Ringer
Thank you for responding to my post. It's great to have a place to go for help! I've discovered my problem, I was also including the postGIS jar. Modifying the jar order, postgres jar first has solved the problem. Never expected a PGConnection class in there, or I'd have expected it to have the same properties. -- View this message in context: http://postgresql.1045698.n5.nabble.com/PGConnection-getNotifications-tp5720230p5720324.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.