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

From: "Etsuro Fujita" <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 06:05:55
Message-ID: 001601cd962c$d4e81780$7eb84680$@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]

> I wrote:
> > "Etsuro Fujita" <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> writes:
> >> 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.
>
> BTW, one thought that comes to mind is that such an operation is
> extremely likely to fail under environments such as SELinux. That's
> not necessarily a reason not to do it, but we should be wary of
> promising that it will work everywhere. Probably a documentation note
> about this would be enough.

OK I'll revise the patch.

Thank you for your advice!

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru HANADA 2012-09-19 09:51:13 Re: proposal - assign result of query to psql variable
Previous Message Bruce Momjian 2012-09-19 06:05:38 Re: [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed