From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, 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 16:33:33 |
Message-ID: | CA+U5nMLnAgAndna9FmOSxcoKoPKfOuOwZ+M6S=4kzsJ-mr7WvQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 14 November 2012 16:20, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>> 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.
>
>>> 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.
>
> I disagree with Simon's objection also, because neither reading from
> nor writing to an external program is likely to fit the model of
> reading/updating a table very well. For instance, there's no good
> reason to suppose that reading twice will give the same results. So
> force-fitting this usage into the FDW model is not going to work well.
>
> Nor do I really see the argument why a "pipe_fdw" module is cleaner
> than a "COPY TO/FROM pipe" feature.
Perhaps not cleaner, but we do need
COPY table FROM (SELECT * FROM foo)
So we will then have both ways.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-11-14 16:36:02 | Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY |
Previous Message | Andrew Dunstan | 2012-11-14 16:32:58 | Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY |