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>, "'Robert Haas'" <robertmhaas(at)gmail(dot)com>
Cc: "'Craig Ringer'" <craig(at)2ndquadrant(dot)com>, "'Simon Riggs'" <simon(at)2ndquadrant(dot)com>, "'Fujii Masao'" <masao(dot)fujii(at)gmail(dot)com>, "'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-11-16 09:41:44
Message-ID: 001101cdc3de$97348510$c59d8f30$@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]

> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > Yeah. If we're going to do this at all, and I'm not convinced it's
> > worth the work, I think it's definitely good to support a variant
> > where we specify exactly the things that will be passed to exec().
> > There's just too many ways to accidentally shoot yourself in the foot
> > otherwise. If we want to have an option that lets people shoot
> > themselves in the foot, that's fine. But I think we'd be smart not to
> > make that the only option.
>
> [ shrug... ] Once again, that will turn this from a ten-line patch
> into hundreds of lines (and some more, different, hundreds of lines
> for Windows I bet), with a corresponding growth in the opportunities
> for bugs, for a benefit that's at best debatable.
>
> The biggest problem this patch has had from the very beginning is
> overdesign, and this is more of the same. Let's please just define the
> feature as "popen, not fopen, the given string" and have done. You can
> put all the warning verbiage you want in the documentation. (But note
> that the server-side version would be superuser-only in any flavor of
> the feature.)

Agreed. I'll reimplement the feature using the PROGRAM keyword:

> COPY TABLE FROM PROGRAM 'command line';
> COPY TABLE TO PROGRAM 'command line';

Sorry for the late response.

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2012-11-16 09:42:26 proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used
Previous Message Simon Riggs 2012-11-16 09:40:07 Re: Do we need so many hint bits?