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?
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
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера