Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Etsuro Fujita" <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: "'Craig Ringer'" <ringerc(at)ringerc(dot)id(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Date: 2012-09-19 03:32:48
Message-ID: 12609.1348025568@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Etsuro Fujita" <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> writes:
>> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>> I think it would be better to present this as something like
>> \copy foo from '/home/pgsql/decompress.sh /home/pgsql/foo.csv.gz |' with
>> format 'csv'

> I have a question. I think it would be also better to extend the syntax for the
> SQL COPY command in the same way, ie,
> COPY foo from '/home/pgsql/decompress.sh /home/pgsql/foo.csv.gz |' with format
> 'csv'

Yeah, sure --- that case is already superuser-only, so why not give it
the option of being a popen instead of just fopen. My objection was
only that it sounded like you were providing *only* the ability to run
the external processors on the server side. Providing popen on both
sides seems completely sensible.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-09-19 03:38:33 Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Previous Message Etsuro Fujita 2012-09-19 02:41:00 Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY