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

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Дата
Msg-id 50A3C7BA.7030000@dunslane.net
обсуждение исходный текст
Ответ на Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 11/14/2012 11:20 AM, Tom Lane wrote:
> 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.
>
>             


Yeah, I agree, although the syntax looks a bit unclean.

Maybe something like
    COPY foo FROM wherever WITH (FILTER '/path/to/program')

might work better. You'd hook up the source to the filter as its stdin 
and read its stdout. Not sure what we'd do for \copy though.


cheers

andrew




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

Предыдущее
От: Nicholas White
Дата:
Сообщение: Re: S_ISLNK
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY