Skip site navigation (1) Skip section navigation (2)

Re: getNotifications

From: dmp <danap(at)ttc-cmc(dot)net>
To: kfan <kfan(dot)b1(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: getNotifications
Date: 2012-08-17 16:49:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
kfan wrote:
> On Fri, Aug 17, 2012 at 9:23 AM, kfan<kfan(dot)b1(at)gmail(dot)com>  wrote:
>> It's not an exception, it's a compile error.  I am casting the connection
>> object to a PGConnection...interesting to note though that the methods
>> available on the PGConnection object only shows the addDatatype method.

Maciek Sakrejda wrote:
> It would help to see your code and the exception you're getting. My
> guess is you're not casting the Connection object you get back from
> DriverManager to a PGConnection, but that's a shot in the dark at this
> point.

Listener(Connection conn) throws SQLException {
       this.conn = conn;
       this.pgconn = (org.postgresql.PGConnection)conn;

I'm not sure, but I think I'm with Maciek's orginally response. I don't
think you're going to be able to cast a java.sql.Connection to PGConnection
then call one of the latter's methods.


In response to


pgsql-jdbc by date

Next:From: Maciek SakrejdaDate: 2012-08-17 17:03:57
Subject: Re: getNotifications
Previous:From: Maciek SakrejdaDate: 2012-08-17 16:43:10
Subject: Re: getNotifications

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group