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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-14 15:55:51
Message-ID: 20121114155551.GD5161@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs escribió:
> On 14 November 2012 15:09, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> >> Here, progname for COPY IN is the user-supplied program that takes filename as
> >> its argument and that writes on standard output.
> >
> > What about further extending the COPY IN syntax to the following?
> >
> > COPY table_name FROM 'progname [ option, ... ]' WITH ...
> >
> > I'd just like to execute
> >
> > COPY vmstat_table FROM 'vmstat' WITH ...
>
> I think we should be using FDWs/SRFs here, not inventing new
> syntax/architectures for executing external code, so -1 from me.

Hmm, but then you are forced to write C code, whereas the "external
program" proposal could have you writing a only shell script instead.
So there is some merit to this idea ... though we could have a
"pipe_fdw" that could let you specify an arbitrary program to run.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicholas White 2012-11-14 16:19:26 Re: S_ISLNK
Previous Message Amit Kapila 2012-11-14 15:55:45 Re: [PATCH] Patch to compute Max LSN of Data Pages