Thread: copy from pipe

copy from pipe

From
Hans Ginzel
Date:
Hello,

please, is it possible to copy from pipe? E.g.

COPY Table_Name FROM 'xzcat file.xz|';

Thank you
HG


Re: copy from pipe

From
Skylar Thompson
Date:
I think you'll want to look at the PROGRAM option for COPY:

http://www.postgresql.org/docs/9.3/static/sql-copy.html

Alternatively, you could probably use a named pipe instead of a regular
file and run the command separately from PostgreSQL.

On Tue, Feb 17, 2015 at 08:43:11PM +0100, Hans Ginzel wrote:
> Hello,
>
> please, is it possible to copy from pipe? E.g.
>
> COPY Table_Name FROM 'xzcat file.xz|';
>
> Thank you
> HG

--
-- Skylar Thompson (skylar2@u.washington.edu)
-- Genome Sciences Department, System Administrator
-- Foege Building S046, (206)-685-7354
-- University of Washington School of Medicine