Re: pgsql and streams - Mailing list pgsql-general

From Christopher Condit
Subject Re: pgsql and streams
Date
Msg-id 845AADAC1106E44996327D62097E4C6B8AA568@et.ad.sdsc.edu
Whole thread Raw
In response to pgsql and streams  ("Christopher Condit" <condit@sdsc.edu>)
List pgsql-general
Hi Tino - thanks for your response.

Do you think that's the best way to go - just use Java to launch an
external load command to psql.exe?  Does anyone else know of a way to
accomplish this with Java?

Thanks,
Chris

-----Original Message-----
From: Tino Wildenhain [mailto:tino@wildenhain.de]
Sent: Thursday, March 30, 2006 1:07 AM
To: Christopher Condit
Cc: pgsql-general
Subject: Re: [GENERAL] pgsql and streams

Christopher Condit schrieb:
> Back to this thread - I realize that in the "COPY TO" documentation,
it
> states the CSV file used for loading must be on the server's disk.  If
I
> can't put files on the server's disk, I'm curious if I can use the
STDIN
> option from my JDBC client to load the data to the server?  Using psql
I
> can stream data after the call. Is there anyway to accomplish the same
> thing with JDBC?
>

Not sure about JDBC but you can in fact stream your data to COPY via
STDIN - which is the network socket of your database connection.

I'm using this with python for example.

Regards
Tino

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Chasing "signal 11" issues
Next
From: "Andrus"
Date:
Subject: How to concat strings so that trailing spaces remain