Using statement parameters with Copy API?

From: Jim Garrison <jim(dot)garrison(at)nwea(dot)org>
To: PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Using statement parameters with Copy API?
Date: 2013-09-11 16:54:44
Message-ID: 0C723FEB5B4E5642B25B451BA57E27303EE01F7C@S1P5DAG3C.EXCHPROD.USA.NET
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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.

Is there a way to accomplish this other than just building the SQL with values already substituted?

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2013-09-11 17:04:05 Re: CopyManager API?
Previous Message Jim Garrison 2013-09-11 15:59:35 Re: CopyManager API?