I believe that statement cannot be executed using ODBC interface. It needs to be wrapped into PgPlSQL block or SQL function or something else because it refers to a parameter.

However if you switch to the native driver connect using PqLib you should be able to execute it.

PqLib provides more features as compared to ODBC interface, in SA it also enables using the COPY command to load data into tables on the server from text files on the client and from clipboard. PqLib is preinstalled with SA.