Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 812151337B6C for ; Thu, 25 Nov 2010 12:15:15 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 87451-04 for ; Thu, 25 Nov 2010 16:15:08 +0000 (UTC) X-Greylist: delayed 00:14:55.491618 by SQLgrey-1.7.6 Received: from smtphost.cis.strath.ac.uk (smtphost.cis.strath.ac.uk [130.159.196.96]) by mail.postgresql.org (Postfix) with ESMTP id D812A1337B6D for ; Thu, 25 Nov 2010 12:15:07 -0400 (AST) Received: from [130.159.184.31] (martin@pc-martin.cis.strath.ac.uk [130.159.184.31]) by arnott.cis.strath.ac.uk (8.14.2/8.14.2/Debian-2build1) with ESMTP id oAPG07HX029535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 25 Nov 2010 16:00:07 GMT Message-ID: <4CEE8807.9030401@cis.strath.ac.uk> Date: Thu, 25 Nov 2010 16:00:07 +0000 From: Martin Goodfellow User-Agent: Thunderbird 2.0.0.24 (X11/20101027) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Problem with COPY using PostgreSQL 9 and JDBC 4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-CIS-MailScanner-SpamCheck: SpamAssassin score=-1.44, ALL_TRUSTED X-Scanned-By: MIMEDefang on 130.159.196.96 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/95 X-Sequence-Number: 21216 Hi all, I'm having some trouble using this command via JDBC. I have a set of files with which I would like to populate database tables. If I use the command, copy table from file with Delimiter ' ';, I get nothing being added to the table should it be via JDBC but if I do it on the command line I get all the results added as required. I've tried to find if other people are having this problem and can't see any problems related to the current version of PostgreSQL. Some of the older versions I realised didn't support the copy command via JDBC but as far as I can see version 9 does. Could anyone shed some light on this as to what I am doing wrong? Note: originally the files were binary and the query was complaining about the file signature despite them being valid binary files. The same command was used but with "with binary" being added to the query. Any help would be much appreciated. Regards, Martin