Re: psql COPY with JDBC - Mailing list pgsql-jdbc

From Markus Schaber
Subject Re: psql COPY with JDBC
Date
Msg-id 44329CF2.6010204@logix-tt.com
Whole thread Raw
In response to psql COPY with JDBC  ("Christopher Condit" <condit@sdsc.edu>)
List pgsql-jdbc
Hi, Christopher,

Christopher Condit wrote:

> I’ve been trying over at the general postgres list with no luck, so I
> thought I’d 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’d like to be able
> 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



--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


pgsql-jdbc by date:

Previous
From: Giuseppe Sacco
Date:
Subject: Italian translation update and double single quote
Next
From: Markus Schaber
Date:
Subject: Re: psql COPY with JDBC