Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1F3D6632E36 for ; Thu, 23 Jul 2009 06:03:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 56621-02 for ; Thu, 23 Jul 2009 06:03:07 -0300 (ADT) X-Greylist: delayed 00:13:44.038543 by SQLgrey-1.7.6 Received: from h206.core.ignum.cz (h206.core.ignum.cz [217.31.49.206]) by mail.postgresql.org (Postfix) with ESMTP id 62EDC632263 for ; Thu, 23 Jul 2009 06:03:12 -0300 (ADT) Received: from hoblik.core.ignum.cz (hoblik.local.ignum.cz [192.168.1.16]) by hroch.core.ignum.cz (Postfix) with ESMTP id 04C228898FD for ; Thu, 23 Jul 2009 10:49:07 +0200 (CEST) Received: from [10.0.0.4] (152.100.broadband10.iol.cz [90.177.100.152]) by hoblik.core.ignum.cz (Postfix) with ESMTP id C5D928E6EA for ; Thu, 23 Jul 2009 10:49:15 +0200 (CEST) Message-ID: <4A682408.5000209@kyberie.cz> Date: Thu, 23 Jul 2009 10:49:12 +0200 From: =?ISO-8859-2?Q?Ond=F8ej_Fafejta?= User-Agent: Thunderbird 2.0.0.22 (X11/20090630) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: COPY SELECT with parameters X-Enigmail-Version: 0.95.7 OpenPGP: id=4F3B37FA Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=-10 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/55 X-Sequence-Number: 19823 Hi, I think there is bug in jdbc driver. I need to add some parameters to query by PreparedStatement - setString(1,'some text'); If the query begins with COPY (SELECT, it does not work. 1. it works String query = "COPY (SELECT id, name FROM test_text WHERE id<10) TO '/tmp/test.csv' csv"; con.createStatement().execute(query); 2. it does not work String query = "COPY (SELECT id, name FROM test_text WHERE id