PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> auto sql = "COPY(SELECT version_ts FROM test_point WHERE serie_id =
> $1::int) TO STDOUT (FORMAT binary)";
Don't hold your breath for that to work :-(. Utility statements in
general do not support parameterization. COPY is not an exception,
even when it contains what looks like a full DML command. Maybe
somebody will improve that someday, but we'll certainly treat it
as a new feature not a bug fix.
regards, tom lane