Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VKLtW-0001nw-Fe for pgsql-jdbc@arkaria.postgresql.org; Fri, 13 Sep 2013 05:26:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VKLtV-0007nw-RU for pgsql-jdbc@arkaria.postgresql.org; Fri, 13 Sep 2013 05:26:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VKLtU-0007np-Us for pgsql-jdbc@postgresql.org; Fri, 13 Sep 2013 05:26:13 +0000 Received: from mail63.csoft.net ([205.205.214.4]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VKLtQ-00008V-CA for pgsql-jdbc@postgresql.org; Fri, 13 Sep 2013 05:26:12 +0000 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 929C728473; Fri, 13 Sep 2013 00:26:05 -0500 (EST) Received: by leary.csoft.net (Postfix, from userid 507) id 7AB67A19F; Fri, 13 Sep 2013 01:29:40 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 507) id E05D9A2B1; Fri, 13 Sep 2013 01:46:58 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 0BD29A1A4; Thu, 12 Sep 2013 17:34:48 -0400 (EDT) Date: Thu, 12 Sep 2013 17:34:48 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Jim Garrison cc: "pgsql-jdbc@postgresql.org" Subject: Re: Using CopyManager with pooled JCA connection In-Reply-To: <0C723FEB5B4E5642B25B451BA57E27303EE03383@S1P5DAG3C.EXCHPROD.USA.NET> Message-ID: References: <0C723FEB5B4E5642B25B451BA57E27303EE03319@S1P5DAG3C.EXCHPROD.USA.NET> <0C723FEB5B4E5642B25B451BA57E27303EE03350@S1P5DAG3C.EXCHPROD.USA.NET> <0C723FEB5B4E5642B25B451BA57E27303EE03383@S1P5DAG3C.EXCHPROD.USA.NET> User-Agent: Alpine 2.03 (BSO 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Pg-Spam-Score: -1.3 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Thu, 12 Sep 2013, Jim Garrison wrote: > >From: Sehrope Sarkuni [mailto:sehrope@jackdb.com] Sent: Thursday, > >September 12, 2013 2:01 PM One other trick is that if you can get > >anything that implements java.sql.Connection you can usually get to the > >"raw" connection by first getting the DB meta data object and then > >getting the original connection from it. > > Spring has a decent explanation of in SimpleNativeJdbcExtractor[1]. > Basically you do conn.getMetaData().getConnection() > This seems like a dangerous thing to rely on. Not proxying DatabaseMetaData seems like a bug to me. Yes, the PG driver doesn't do it currently, but if it did and broke user code that relied on it not proxying, I wouldn't have a whole lot of sympathy for the user. Kris Jurka -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc