Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJyHs-0002H2-Vt for pgsql-jdbc@arkaria.postgresql.org; Thu, 12 Sep 2013 04:13:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VJyHs-0004Ay-Fc for pgsql-jdbc@arkaria.postgresql.org; Thu, 12 Sep 2013 04:13:48 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJyHr-0004Ab-Bd for pgsql-jdbc@postgresql.org; Thu, 12 Sep 2013 04:13:47 +0000 Received: from mail63.csoft.net ([205.205.214.4]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJyHn-00036Q-6E for pgsql-jdbc@postgresql.org; Thu, 12 Sep 2013 04:13:46 +0000 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 75AC02840E; Wed, 11 Sep 2013 23:13:39 -0500 (EST) Received: by leary.csoft.net (Postfix, from userid 1112) id 67419A15B; Thu, 12 Sep 2013 00:13:39 -0400 (EDT) Date: Thu, 12 Sep 2013 00:13:39 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Jim Garrison cc: PostgreSQL JDBC Subject: Re: Using statement parameters with Copy API? In-Reply-To: <0C723FEB5B4E5642B25B451BA57E27303EE01F7C@S1P5DAG3C.EXCHPROD.USA.NET> Message-ID: References: <0C723FEB5B4E5642B25B451BA57E27303EE01F7C@S1P5DAG3C.EXCHPROD.USA.NET> User-Agent: Alpine 2.03 (BSO 1266 2009-07-14) MIME-Version: 1.0 X-Pg-Spam-Score: -2.7 (--) Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE 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 Wed, 11 Sep 2013, Jim Garrison wrote: >=20 > I want to use the copy API to execute a parameterized query, as in >=20 > COPY (SELECT * FROM TABLE WHERE KEY=3D?) TO STDOUT FORMAT BINARY >=20 > As far as I can tell it is not currently possible to prepare this stateme= nt > and pass it to the copy API. > =A0 This is a limitation of the server. It doesn't accept parameterized COPY=20 statements so the JDBC driver doesn't have a way to pass such a statement.= =20=20 Perhaps the driver could perform the text interpolation itself as it does=20 in the V2 protocol, but that would also complicate the API if you wanted=20 to have something similar to PreparedStatement. Kris Jurka --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc