X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id DB89711F6298 for ; Tue, 4 Apr 2006 13:20:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83451-10 for ; Tue, 4 Apr 2006 13:20:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 9F46E11F628A for ; Tue, 4 Apr 2006 13:20:56 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (T83dd.t.pppool.de [89.55.131.221]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 18F9F656C0; Tue, 4 Apr 2006 18:21:41 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id CBD1F1819E7E7; Tue, 4 Apr 2006 18:21:06 +0200 (CEST) Message-ID: <44329CF2.6010204@logix-tt.com> Date: Tue, 04 Apr 2006 18:21:06 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christopher Condit Cc: pgsql-jdbc@postgresql.org Subject: Re: psql COPY with JDBC References: <845AADAC1106E44996327D62097E4C6B8AA6BC@et.ad.sdsc.edu> In-Reply-To: <845AADAC1106E44996327D62097E4C6B8AA6BC@et.ad.sdsc.edu> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.114 required=5 tests=[AWL=0.114] X-Spam-Score: 0.114 X-Spam-Level: X-Archive-Number: 200604/37 X-Sequence-Number: 14971 Hi, Christopher, Christopher Condit wrote: > I=92ve been trying over at the general postgres list with no luck, so I= > thought I=92d try here. I need to bulk load results from a Java > application on one machine to a postgres db on a remote server. I know= > I can use psql interactively to accomplish this, but I=92d like to be a= ble > to do it programmatically: Some ideas for "ugly hacks": - Use a java.lang.ProcessBuilder and pipe into psql - Use some secure channel (e. G. libjsch or https upload) to copy the date into a file on the server, and then issue "COPY table FROM file". HTH, Markus --=20 Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.= org