Re: COPY to/from non-local file

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Jaime Silvela <JSilvela(at)Bear(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY to/from non-local file
Date: 2007-06-27 16:18:08
Message-ID: 20070627161808.GB22179@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 27, 2007 at 10:32:32AM -0400, Jaime Silvela wrote:
> I've been looking around for this functionality:
> Is it possible to use COPY with a file that doesn't reside in the DB's
> filesystem? I know there is sort of a solution in using COPY from stdin/
> COPY to stdout, however that depends on calling the psql command, which
> breaks the flow of control of the programs I'm trying to write.

Sorry? Copy to stdout/from stdin can be done by normal programs also,
not just psql. Execute the command and then use putline/getline to
transfer the data. In perl DBI is works like that, for C also, so
probably from ruby also.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin Gainty 2007-06-27 16:46:59 Re: How do you handle shared memory corruption issues? (contrib/xml2)
Previous Message CG 2007-06-27 16:02:07 How do you handle shared memory corruption issues? (contrib/xml2)