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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Дата
Msg-id 20295.1352910059@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY  (Andrew Dunstan <andrew@dunslane.net>)
Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Simon Riggs escribi�:
>> On 14 November 2012 15:09, Fujii Masao <masao.fujii@gmail.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.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [PATCH] Patch to compute Max LSN of Data Pages
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: foreign key locks