From: Kris Jurka <books@ejurka.com>
To: Jim Garrison <jim.garrison@nwea.org>
Cc: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: Using statement parameters with Copy API?
Date: Thu, 12 Sep 2013 00:13:39 -0400 (EDT)
Message-ID: <alpine.BSO.2.03.1309120004460.15738@ejurka.com> (raw)
In-Reply-To: <0C723FEB5B4E5642B25B451BA57E27303EE01F7C@S1P5DAG3C.EXCHPROD.USA.NET>
References: <0C723FEB5B4E5642B25B451BA57E27303EE01F7C@S1P5DAG3C.EXCHPROD.USA.NET>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
On Wed, 11 Sep 2013, Jim Garrison wrote:
>
> I want to use the copy API to execute a parameterized query, as in
>
> COPY (SELECT * FROM TABLE WHERE KEY=?) TO STDOUT FORMAT BINARY
>
> As far as I can tell it is not currently possible to prepare this statement
> and pass it to the copy API.
>
This is a limitation of the server. It doesn't accept parameterized COPY
statements so the JDBC driver doesn't have a way to pass such a statement.
Perhaps the driver could perform the text interpolation itself as it does
in the V2 protocol, but that would also complicate the API if you wanted
to have something similar to PreparedStatement.
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, jim.garrison@nwea.org
Subject: Re: Using statement parameters with Copy API?
In-Reply-To: <alpine.BSO.2.03.1309120004460.15738@ejurka.com>
References: <0C723FEB5B4E5642B25B451BA57E27303EE01F7C@S1P5DAG3C.EXCHPROD.USA.NET> <alpine.BSO.2.03.1309120004460.15738@ejurka.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox