Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2PrW-0006xA-My for pgsql-jdbc@postgresql.org; Fri, 17 Aug 2012 16:57:30 +0000 Received: from outbound.vnet-inc.com ([216.146.104.103]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2PrV-0006He-07 for pgsql-jdbc@postgresql.org; Fri, 17 Aug 2012 16:57:29 +0000 Received: from [192.168.157.132] (unknown [76.75.27.41]) by outbound.vnet-inc.com (Postfix) with ESMTP id 18BAD5982; Fri, 17 Aug 2012 10:57:29 -0600 (MDT) Message-ID: <502E7618.6040008@ttc-cmc.net> Date: Fri, 17 Aug 2012 10:49:28 -0600 From: dmp User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.13) Gecko/20100914 SeaMonkey/2.0.8 MIME-Version: 1.0 To: kfan , pgsql-jdbc@postgresql.org Subject: Re: getNotifications References: <1345217428484-5720228.post@n5.nabble.com> <1345220585174-5720235.post@n5.nabble.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/40 X-Sequence-Number: 23195 kfan wrote: > On Fri, Aug 17, 2012 at 9:23 AM, kfan 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. danap.